@import url("/assets/tailwind.css");
:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #fff;
  --line: #e3e7ec;
  --muted: #647185;
  --text: #1b293b;
  --brand: #147d70;
  --blue: #315caa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.55 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8dfe7;
  background: white;
  color: #344258;
  border-radius: 7px;
  padding: 9px 13px;
  font-weight: 550;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: #f0f4f6;
  border-color: #aebdca;
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.primary:hover {
  background: #0d665c;
  border-color: #0d665c;
}
.quiet {
  background: transparent;
}
.danger {
  color: #ac3b46;
}
.icon-button {
  padding: 8px 12px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #73bdb3;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d5dde7;
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  line-height: 1.4;
}
input::placeholder,
textarea::placeholder {
  color: #8692a2;
}
label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 550;
  color: #4f5d70;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 17px;
  accent-color: var(--brand);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  font-weight: 680;
  letter-spacing: -0.9px;
  line-height: 1.2;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.35px;
  margin-bottom: 16px;
}
h3 {
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 10px;
}
p {
  color: var(--muted);
  margin-bottom: 16px;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 11px;
}
.block {
  display: block;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 9px;
}
.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 25px 14px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.6px;
  padding: 0 4px 30px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: #177d70;
  color: #fff;
  font-size: 17px;
  width: 36px;
  height: 38px;
  border-radius: 10px;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.brand-name {
  font-size: 16px;
}
.brand small {
  display: block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.2px;
  margin-top: 3px;
  color: #7c8796;
}
.brand > span:not(.brand-mark):not(.brand-name) {
  color: var(--brand);
}
.nav-group {
  margin-bottom: 24px;
}
.nav-label {
  display: block;
  padding: 0 13px 8px;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b95a4;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #657084;
  font-size: 13px;
  margin-bottom: 3px;
}
.sidebar nav a:hover {
  background: #f3f6f7;
  text-decoration: none;
  color: var(--text);
}
.sidebar nav a.active {
  background: #e8f3ef;
  color: #146759;
  font-weight: 650;
}
.navicon {
  display: flex;
  flex-shrink: 0;
}
.sidebar footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 18px 4px 0;
}
.sidebar footer button {
  width: 100%;
  margin-top: 15px;
  font-size: 12px;
}
.workspace-profile {
  display: flex;
  gap: 10px;
  align-items: center;
}
.workspace-profile strong {
  font-size: 12px;
}
.workspace-profile small {
  display: block;
  font-size: 10px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #eef0f5;
  color: #596a80;
  font-size: 11px;
  font-weight: 700;
}
.main {
  width: 100%;
  min-width: 0;
  max-width: 1920px;
  padding: 0 32px 50px;
}
.topbar {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 12px;
  color: #8992a0;
}
.breadcrumb span {
  margin: 0 12px;
  color: #b4bdc8;
}
.breadcrumb strong {
  font-weight: 550;
  color: #596779;
}
.topbar-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.global-search input {
  width: 230px;
  background: #fff;
  font-size: 12px;
  padding: 8px 12px;
}
.mobile-logout {
  display: none;
}
.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.heading p {
  margin-bottom: 0;
  font-size: 13px;
}
.heading .actions {
  flex-shrink: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 22px;
}
.card {
  padding: 20px;
  border-right: 1px solid var(--line);
}
.card:last-child {
  border: 0;
}
.card strong {
  display: block;
  font-size: 27px;
  font-weight: 650;
  margin: 6px 0;
}
.card p {
  font-size: 11px;
  margin: 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 20px;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.full {
  grid-column: 1/-1;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar label:first-child {
  flex: 1;
  min-width: 180px;
}
.toolbar select {
  min-width: 145px;
}
.tablewrap {
  width: 100%;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #7a8594;
  font-weight: 650;
  background: #f8fafb;
}
td,
th {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 12px;
}
td small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}
td.route {
  min-width: 200px;
  max-width: 300px;
  white-space: normal;
}
td.title {
  min-width: 155px;
  max-width: 220px;
  white-space: normal;
}
tbody tr:hover {
  background: #f7faf9;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  gap: 5px;
  border-radius: 5px;
  background: #eef0f3;
  color: #697486;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.new,
.badge.invited {
  background: #edf3ff;
  color: #3a69ae;
}
.badge.quoted,
.badge.bid {
  background: #f2edfb;
  color: #7958a8;
}
.badge.confirmed,
.badge.assigned,
.badge.paid {
  background: #e8f4ee;
  color: #267d5b;
}
.badge.completed {
  background: #e9eff4;
  color: #526d85;
}
.badge.cancelled,
.badge.declined,
.badge.urgent {
  background: #fceef0;
  color: #aa4654;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: var(--muted);
}
.empty:before {
  content: "↗";
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dce8e3;
  color: #598b7c;
  border-radius: 12px;
  background: #f2f8f5;
  margin: 0 auto 16px;
  font-size: 22px;
}
.empty h3 {
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}
.empty p {
  max-width: 410px;
  margin: 0 auto 22px;
  font-size: 13px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-top: 18px;
  font-size: 11px;
  color: var(--muted);
}
.pager button {
  font-size: 11px;
  padding: 7px 10px;
}
.work-queues {
  display: flex;
  gap: 4px;
  overflow: auto;
  margin-bottom: 20px;
  padding: 0 0 2px;
}
.work-queues button {
  background: transparent;
  border-color: transparent;
  color: #647185;
  padding: 10px 14px;
  font-size: 12px;
}
.work-queues button span {
  font-size: 10px;
  border-radius: 5px;
  background: #e7eaf0;
  padding: 1px 6px;
  color: #66748b;
}
.work-queues button.active {
  background: #fff;
  border-color: #dbe2e8;
  color: #1d6f60;
  box-shadow: 0 1px 3px #14243708;
}
.work-queues button.active span {
  background: #e4f1eb;
  color: #27775d;
}
.orders-panel {
  padding: 0;
  overflow: hidden;
}
.orders-panel .toolbar {
  padding: 20px;
  margin: 0;
}
.orders-panel .pager {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.list-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.list-caption strong {
  color: #4c5d71;
  font-size: 12px;
}
.list-hint {
  font-size: 11px;
  color: #7c8795;
}
.orders-table td {
  padding: 17px 12px;
}
.orders-table td:first-child,
.orders-table th:first-child {
  padding-left: 20px;
}
.orders-table tbody tr {
  cursor: pointer;
}
.record-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  margin: 0 0 4px;
  font-size: 11px;
}
.record-link:hover {
  background: transparent;
  text-decoration: underline;
}
.route-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.route-line + .route-line {
  margin-top: 6px;
}
.route-dot {
  width: 6px;
  height: 6px;
  border: 1.5px solid #8395a1;
  border-radius: 50%;
  flex-shrink: 0;
}
.route-dot.destination {
  border-color: #2e8673;
  background: #2e8673;
}
.coverage {
  display: inline-block;
  max-width: 150px;
  white-space: normal;
  color: #7a8493;
  font-size: 11px;
}
.coverage.assigned {
  color: #3b5961;
}
.coverage.needed {
  background: #fff5e6;
  color: #946121;
  border-radius: 5px;
  padding: 4px 8px;
}
.amount-due {
  color: #996022;
}
.amount-paid {
  color: #267d5b;
}
.tabs {
  display: flex;
  gap: 0;
  overflow: auto;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  background: transparent;
  color: #7b8594;
  border: 0;
  border-radius: 0;
  padding: 14px 17px;
  border-bottom: 2px solid transparent;
  font-size: 12px;
}
.tabs button.active {
  color: #1c7969;
  border-bottom-color: #1c7969;
  font-weight: 650;
}
.booking-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.booking-controls .tabs {
  margin: 0;
  border: 0;
}
.booking-controls > #saveState {
  font-size: 11px;
  flex-shrink: 0;
}
.booking-page > .heading {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 14px 0;
  margin-top: -14px;
  margin-bottom: 8px;
}
.booking-page > .heading h1 {
  font-size: 23px;
}
.booking-page > .heading p {
  font-size: 11px;
}
.booking-route {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 18px;
}
.booking-route h2 {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.4;
  margin: 5px 0 6px;
  overflow-wrap: anywhere;
}
.booking-route p {
  font-size: 12px;
  margin: 0;
}
.booking-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 18px;
}
.booking-summary > div {
  padding: 17px 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.booking-summary > div:last-child {
  border: 0;
}
.booking-summary small {
  display: block;
  font-size: 10px;
}
.booking-summary strong {
  display: block;
  font-size: 17px;
  font-weight: 650;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #edf5f1;
  border: 1px solid #d9e8e0;
  border-left: 3px solid #3b927b;
  border-radius: 7px;
  padding: 13px 17px;
  margin-bottom: 12px;
}
.next-step strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: #326557;
}
.next-step span {
  display: block;
  font-size: 11px;
  color: #6a7d74;
  margin-top: 3px;
}
.next-step button {
  font-size: 11px;
  background: transparent;
  color: #246e5b;
  border-color: #c9dfd4;
}
.booking-page #orderForm {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.booking-page [data-panel="journey"] {
  grid-column: 1;
  grid-row: 1;
}
.booking-page [data-panel="overview"] {
  grid-column: 2;
  grid-row: 1;
}
.booking-page [data-panel="activity"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.leg {
  padding: 18px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
}
.legbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.legtitle {
  font-size: 12px;
}
.legbar .actions {
  gap: 4px;
}
.legbar button {
  font-size: 10px;
  padding: 4px 7px;
}
.leg .formgrid > label:nth-child(-n + 2) {
  grid-column: 1/-1;
}
.notice {
  background: #eff6f2;
  border: 1px solid #dceae2;
  color: #3c725e;
  border-radius: 7px;
  padding: 13px 16px;
  margin-bottom: 20px;
  font-size: 12px;
}
.notice.warn {
  background: #fff6e9;
  border-color: #eddcbb;
  color: #976326;
}
.error {
  color: #ac3b46;
  white-space: pre-wrap;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 20px 20px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
  font-size: 12px;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  background: #90aaa2;
  border: 2px solid white;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.timeline small {
  display: block;
  margin-top: 3px;
}
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  overflow: auto;
  padding-bottom: 20px;
}
.column {
  background: #edf0f4;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  min-height: 300px;
}
.column h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban {
  background: white;
  border: 1px solid #e0e5eb;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 2px 3px #24324604;
  cursor: grab;
}
.kanban p {
  font-size: 11px;
  margin: 10px 0;
}
.kanban select {
  font-size: 11px;
  padding: 6px;
  margin-top: 12px;
}
.bar {
  height: 5px;
  background: #edf0f3;
  border-radius: 5px;
  margin-top: 10px;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: #6c9c8e;
}
.checkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
dialog {
  background: white;
  color: var(--text);
  border: 1px solid #dce3e8;
  border-radius: 13px;
  width: min(580px, 94vw);
  max-height: 90dvh;
  padding: 28px;
  overflow: auto;
  box-shadow: 0 20px 80px #20304726;
}
dialog::backdrop {
  background: #233b5352;
  backdrop-filter: blur(2px);
}
dialog h2 {
  font-size: 21px;
}
dialog form > .actions {
  margin-top: 22px;
  justify-content: flex-end;
}
body:has(dialog[open]) {
  overflow: hidden;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: #203f36;
  color: white;
  border: 1px solid #3b6a58;
  border-radius: 8px;
  padding: 13px 20px;
  max-width: 90vw;
  display: none;
  box-shadow: 0 8px 30px #20304722;
  font-size: 13px;
}
#toast.show {
  display: block;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
dialog.order-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(550px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  overflow: auto;
  box-shadow: -10px 0 60px #20304722;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding: 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.drawer-head h2 {
  margin-bottom: 0;
  font-size: 21px;
  overflow-wrap: anywhere;
}
.drawer-body {
  padding: 22px 25px;
}
.drawer-body section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.route-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.route-timeline li {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}
.route-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid #dce7e1;
  border-radius: 50%;
  background: #f1f7f3;
  font-size: 11px;
  color: #50816d;
}
.route-timeline strong {
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.route-timeline small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.contact-summary {
  display: flex;
  gap: 12px;
  align-items: center;
}
.contact-summary strong {
  font-size: 13px;
}
.contact-summary small {
  display: block;
  overflow-wrap: anywhere;
}
.drawer-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 25px;
}
.drawer-facts small,
.drawer-facts strong,
.drawer-facts a {
  display: block;
}
.drawer-facts strong {
  font-size: 15px;
  margin: 5px 0;
}
.drawer-facts a {
  font-size: 11px;
}
.drawer-body #quickForm {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 9px;
  background: #fafbfc;
  margin-bottom: 25px;
}
.drawer-body #quickForm .panel-head span {
  font-size: 10px;
}
.drawer-body #quickForm .actions {
  margin-top: 18px;
}
.drawer-body #quickForm .error {
  font-size: 12px;
  margin: 12px 0 0;
}
.drawer-footer {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
  padding: 17px 25px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: white;
  z-index: 2;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
}
.login-story {
  padding: 8vw 7vw;
  background: #eaf1ed;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid #dde7e0;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid #c6d8cd;
  border-radius: 50%;
  right: -200px;
  bottom: -180px;
  box-shadow:
    0 0 0 40px #dce8df,
    0 0 0 80px #e2ece5;
}
.login-story h1 {
  font-size: clamp(34px, 4vw, 61px);
  font-weight: 620;
  line-height: 1.12;
  margin: 45px 0 24px;
  letter-spacing: -2px;
  color: #274b3f;
}
.login-story p {
  font-size: 16px;
  max-width: 420px;
  color: #63796d;
}
.login-story > .brand {
  display: block;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 350px;
}
.login-form label {
  margin: 18px 0;
}
.login-form button {
  width: 100%;
  margin-top: 10px;
}
.login-form .checkrow {
  border: 0;
  padding: 0;
  font-weight: 400;
}
.public {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}
.public header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.public .brand {
  display: block;
  padding: 0;
}
.invoice-total {
  font-size: 38px;
  font-weight: 650;
  color: #244237;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .main {
    padding-left: 42px;
    padding-right: 42px;
  }
  .orders-table td {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 186px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 10px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-mark {
    width: 30px;
    height: 33px;
    font-size: 14px;
  }
  .main {
    padding: 0 22px 40px;
  }
  .heading {
    flex-wrap: wrap;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .booking-page #orderForm {
    grid-template-columns: 1fr;
  }
  .booking-page [data-panel="journey"],
  .booking-page [data-panel="overview"] {
    grid-column: auto;
    grid-row: auto;
  }
  .booking-page [data-panel="journey"] {
    order: -1;
  }
  .booking-page [data-panel="activity"] {
    grid-template-columns: 1fr;
  }
  .booking-summary > div {
    padding: 14px;
  }
  .booking-controls {
    flex-wrap: wrap;
    gap: 0;
  }
  .booking-controls #saveState {
    padding-bottom: 10px;
  }
  .booking-page > .heading {
    position: static;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px 16px 0;
    border: 0;
    background: #fff;
  }
  .brand {
    padding: 0 0 16px;
  }
  .brand-name {
    font-size: 16px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 0;
    border-top: 1px solid var(--line);
    padding: 8px 0;
  }
  .nav-group {
    display: flex;
    gap: 3px;
    margin: 0;
  }
  .nav-label,
  .navicon,
  .sidebar footer {
    display: none;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 8px 10px;
    margin: 0;
    font-size: 12px;
  }
  .main {
    padding: 0 16px 35px;
  }
  .topbar {
    height: 64px;
    margin-bottom: 20px;
    gap: 8px;
  }
  .breadcrumb {
    display: none;
  }
  .topbar-actions {
    width: 100%;
    gap: 10px;
  }
  .global-search {
    flex: 1;
  }
  .global-search input {
    width: 100%;
  }
  .mobile-logout {
    display: inline-flex;
    font-size: 11px;
  }
  .desktop-profile {
    display: none;
  }
  .heading {
    display: block;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 25px;
  }
  .heading .actions {
    margin-top: 15px;
  }
  .heading p {
    font-size: 12px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .card {
    padding: 15px;
  }
  .card strong {
    font-size: 23px;
  }
  .card:nth-child(2) {
    border-right: 0;
  }
  .panel {
    padding: 17px;
  }
  .panel-head {
    gap: 10px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .booking-summary {
    grid-template-columns: 1fr 1fr;
  }
  .booking-summary > div {
    padding: 13px;
  }
  .booking-summary > div:nth-child(2) {
    border: 0;
  }
  .booking-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .booking-summary strong {
    font-size: 15px;
  }
  .booking-route {
    padding-top: 8px;
    gap: 10px;
  }
  .booking-route h2 {
    font-size: 21px;
  }
  .next-step {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px;
  }
  .booking-controls {
    display: block;
  }
  .booking-controls .tabs {
    margin-bottom: 8px;
  }
  .booking-controls .tabs button {
    padding: 12px 9px;
    font-size: 11px;
  }
  .booking-controls #saveState {
    display: block;
  }
  .orders-panel {
    padding: 0;
  }
  .orders-panel .toolbar {
    padding: 16px;
    gap: 10px;
  }
  .toolbar label {
    flex: 1;
    min-width: 125px;
  }
  .toolbar label:first-child {
    flex-basis: 100%;
  }
  .toolbar select {
    min-width: 0;
  }
  .list-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
  }
  .work-queues {
    margin-bottom: 16px;
  }
  .work-queues button {
    padding: 9px 11px;
    font-size: 11px;
  }
  .pager {
    flex-wrap: wrap;
  }
  .list-hint {
    font-size: 10px;
  }
  .drawer-head {
    padding: 19px;
  }
  .drawer-body {
    padding: 20px;
  }
  .drawer-footer {
    padding: 15px 20px;
  }
  .drawer-facts {
    gap: 12px;
  }
  .drawer-body #quickForm {
    padding: 15px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 28px;
  }
  .login-story h1 {
    font-size: 32px;
    letter-spacing: -1px;
    margin: 15px 0;
  }
  .login-story p,
  .login-story .actions {
    display: none;
  }
  .login-story:after {
    display: none;
  }
  .login-form {
    padding: 28px;
  }
  .public {
    padding: 25px 16px;
  }
  .public header {
    gap: 14px;
  }
  .public header button {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.order-drawer[open] {
    animation: drawer-in 0.18s ease-out;
  }
  @keyframes drawer-in {
    from {
      transform: translateX(30px);
      opacity: 0.6;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
}
@media print {
  body {
    background: #fff;
    color: #172d24;
  }
  .public {
    max-width: 100%;
    padding: 0;
  }
  .no-print,
  button,
  .sidebar,
  .topbar {
    display: none !important;
  }
  .panel,
  .card {
    break-inside: avoid;
    border-color: #ddd;
    box-shadow: none;
  }
  .badge {
    color: #333;
    background: #eee;
  }
  td,
  th {
    border-color: #ddd;
  }
  p,
  small,
  .muted {
    color: #555;
  }
}
/* Browser-level theme preference. The control is shared by staff and public views. */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 30px;
  width: 36px;
  height: 36px;
  padding: 8px;
  z-index: 25;
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: 0 1px 3px #20304708;
}
.topbar-actions {
  padding-right: 52px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131a24;
  --panel: #1b2532;
  --line: #303d4d;
  --muted: #a3b0c1;
  --text: #e7edf5;
  --brand: #75cdb6;
  --blue: #9abbe9;
}
html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}
html[data-theme="dark"] button,
html[data-theme="dark"] .button {
  background: #253343;
  border-color: #3b4b60;
  color: #dce6f0;
}
html[data-theme="dark"] button:hover,
html[data-theme="dark"] .button:hover {
  background: #304359;
  border-color: #5d748b;
}
html[data-theme="dark"] .primary {
  background: #87d5bc;
  color: #102f27;
  border-color: #87d5bc;
}
html[data-theme="dark"] .primary:hover {
  background: #a3e3ce;
  border-color: #a3e3ce;
}
html[data-theme="dark"] .quiet {
  background: transparent;
}
html[data-theme="dark"] .danger,
html[data-theme="dark"] .error {
  color: #ffabb8;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #16212e;
  border-color: #425268;
  color: var(--text);
}
html[data-theme="dark"] label {
  color: #bfcbd9;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8c9bb0;
}
html[data-theme="dark"] .sidebar {
  background: #17212d;
}
html[data-theme="dark"] .sidebar nav a {
  color: #a4b3c6;
}
html[data-theme="dark"] .sidebar nav a:hover {
  background: #253445;
  color: #e7edf5;
}
html[data-theme="dark"] .sidebar nav a.active {
  background: #233d38;
  color: #94dec7;
}
html[data-theme="dark"] .nav-label,
html[data-theme="dark"] .brand small {
  color: #8f9eb1;
}
html[data-theme="dark"] .brand-mark {
  background: #2a7666;
  color: #e1f8ee;
}
html[data-theme="dark"] .avatar {
  background: #2d3b4e;
  color: #c0d2e8;
}
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .breadcrumb strong {
  color: #a0aec1;
}
html[data-theme="dark"] .breadcrumb span {
  color: #67788f;
}
html[data-theme="dark"] .cards,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .booking-summary {
  background: var(--panel);
}
html[data-theme="dark"] th {
  background: #17222e;
  color: #a1b0c3;
}
html[data-theme="dark"] tbody tr:hover {
  background: #21313e;
}
html[data-theme="dark"] .badge {
  background: #2e3a4b;
  color: #bdcadd;
}
html[data-theme="dark"] .badge.new,
html[data-theme="dark"] .badge.invited {
  background: #273c5b;
  color: #b0cef6;
}
html[data-theme="dark"] .badge.quoted,
html[data-theme="dark"] .badge.bid {
  background: #3d3450;
  color: #d4bceb;
}
html[data-theme="dark"] .badge.confirmed,
html[data-theme="dark"] .badge.assigned,
html[data-theme="dark"] .badge.paid {
  background: #244638;
  color: #99d8b4;
}
html[data-theme="dark"] .badge.completed {
  background: #2d3e50;
  color: #b4c9de;
}
html[data-theme="dark"] .badge.cancelled,
html[data-theme="dark"] .badge.declined,
html[data-theme="dark"] .badge.urgent {
  background: #4c303b;
  color: #efb0be;
}
html[data-theme="dark"] .empty:before {
  background: #233c35;
  border-color: #36534a;
  color: #a1cdbc;
}
html[data-theme="dark"] .work-queues button {
  background: transparent;
  border-color: transparent;
  color: #a7b5c7;
}
html[data-theme="dark"] .work-queues button span {
  background: #303d50;
  color: #c0ccdd;
}
html[data-theme="dark"] .work-queues button.active {
  background: #243b36;
  border-color: #36554b;
  color: #b4e4d4;
}
html[data-theme="dark"] .work-queues button.active span {
  background: #35574a;
  color: #c2efdc;
}
html[data-theme="dark"] .list-caption strong {
  color: #c3d0df;
}
html[data-theme="dark"] .list-hint {
  color: #9cabbf;
}
html[data-theme="dark"] .record-link {
  background: transparent;
  color: var(--brand);
  border: 0;
}
html[data-theme="dark"] .coverage {
  color: #b0bdcd;
}
html[data-theme="dark"] .coverage.assigned {
  color: #c2dbd7;
}
html[data-theme="dark"] .coverage.needed {
  background: #4b3e29;
  color: #edcc96;
}
html[data-theme="dark"] .amount-due {
  color: #e0be84;
}
html[data-theme="dark"] .amount-paid {
  color: #91d3b5;
}
html[data-theme="dark"] .tabs button {
  background: transparent;
  color: #abb8ca;
  border-bottom-color: transparent;
}
html[data-theme="dark"] .tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
html[data-theme="dark"] .next-step,
html[data-theme="dark"] .notice {
  background: #233c33;
  border-color: #38564a;
  color: #b5d9c8;
}
html[data-theme="dark"] .next-step strong {
  color: #c0e2d4;
}
html[data-theme="dark"] .next-step span {
  color: #b0c8be;
}
html[data-theme="dark"] .next-step button {
  background: transparent;
  border-color: #507263;
  color: #bce9d9;
}
html[data-theme="dark"] .notice.warn {
  background: #443928;
  border-color: #6d5836;
  color: #e3c99c;
}
html[data-theme="dark"] .timeline li:before {
  border-color: var(--panel);
  background: #8bae9e;
}
html[data-theme="dark"] .column {
  background: #1a2431;
}
html[data-theme="dark"] .kanban {
  background: #243142;
  border-color: #3a485c;
}
html[data-theme="dark"] .bar {
  background: #303d50;
}
html[data-theme="dark"] dialog {
  background: var(--panel);
  color: var(--text);
  border-color: #435369;
}
html[data-theme="dark"] dialog::backdrop {
  background: #030a1399;
}
html[data-theme="dark"] .drawer-head,
html[data-theme="dark"] .drawer-footer {
  background: var(--panel);
}
html[data-theme="dark"] .route-number {
  background: #2c483c;
  border-color: #466355;
  color: #b6d8c3;
}
html[data-theme="dark"] .drawer-body #quickForm {
  background: #17222f;
}
html[data-theme="dark"] .login {
  background: #17212e;
}
html[data-theme="dark"] .login-story {
  background: #24382f;
  border-color: #3b5145;
}
html[data-theme="dark"] .login-story h1 {
  color: #d5e6dc;
}
html[data-theme="dark"] .login-story p {
  color: #b6cbbf;
}
html[data-theme="dark"] .login-story:after {
  border-color: #3d5949;
  box-shadow:
    0 0 0 40px #2a4134,
    0 0 0 80px #273c31;
}
html[data-theme="dark"] .invoice-total {
  color: #bedfce;
}
@media (max-width: 700px) {
  .theme-toggle {
    top: 15px;
    right: 16px;
  }
  .topbar-actions {
    padding-right: 0;
  }
  .sidebar > .brand {
    padding-right: 46px;
  }
  .login-story > .brand {
    padding-right: 40px;
  }
  .public header {
    padding-top: 40px;
  }
}
@media print {
  html[data-theme="dark"] {
    color-scheme: light;
    --bg: white;
    --panel: white;
    --line: #ddd;
    --muted: #555;
    --text: #172d24;
    --brand: #276650;
  }
  html[data-theme="dark"] body,
  html[data-theme="dark"] .panel,
  html[data-theme="dark"] .card {
    background: white !important;
    color: #172d24 !important;
  }
  html[data-theme="dark"] .invoice-total {
    color: #172d24;
  }
  html[data-theme="dark"] th {
    background: #f5f5f5;
    color: #555;
  }
  html[data-theme="dark"] .badge {
    background: #eee;
    color: #333;
  }
}
.selection-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 125px;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  align-items: center;
}
.selection-line > label:first-child {
  display: block;
}
.selection-line input[type="checkbox"] {
  display: inline-block;
  margin-right: 8px;
}
.selection-line small {
  display: block;
  font-weight: 400;
  margin-top: 5px;
}
.sequence-preview {
  list-style: decimal;
  padding-left: 22px;
  color: var(--muted);
  font-size: 12px;
}
.sequence-preview li {
  padding: 8px 0;
}
.workflow-step {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  margin: 0 0 16px;
  background: var(--bg);
}
.workflow-step:after {
  content: "↓";
  display: block;
  text-align: center;
  color: var(--muted);
  margin-bottom: -28px;
  margin-top: 8px;
}
.workflow-step:last-child:after {
  display: none;
}
.workflow-step .actions button {
  padding: 5px 8px;
  font-size: 11px;
}
.workflow-step label + label {
  margin-top: 12px;
}
.email-draft {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.email-draft summary {
  cursor: pointer;
}
.email-draft pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  background: var(--bg);
  padding: 16px;
  border-radius: 7px;
  margin: 12px 0;
}
.call-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
}
.call-list {
  max-height: 70vh;
  overflow: auto;
}
.call-list button {
  display: block;
  text-align: left;
  width: 100%;
  white-space: normal;
  margin: 10px 0;
}
.call-list button small {
  display: block;
  font-weight: 400;
}
.call-list .primary small {
  color: inherit;
}
.call-context p {
  margin-top: 10px;
}
.journey-tools {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 20px;
}
.journey-tools .toolbar {
  gap: 8px;
}
.journey-tools .toolbar button,
.journey-tools .actions a {
  font-size: 10px;
  padding: 8px;
}
.journey-tools .toolbar label {
  flex-basis: 100%;
}
.journey-tools h2 {
  font-size: 15px;
}
.journey-tools .panel-head strong {
  font-size: 12px;
}
.map-placeholder {
  min-height: 180px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  place-content: center;
  text-align: center;
  margin-bottom: 14px;
  overflow: hidden;
}
.map-placeholder:has(iframe) {
  padding: 0;
  display: block;
}
.map-placeholder iframe {
  border: 0;
  width: 100%;
  height: 320px;
}
.map-note {
  font-size: 11px;
  margin-top: 15px;
}
.booking-shortcuts {
  margin-bottom: 20px;
}
.booking-shortcuts button,
.booking-shortcuts a {
  font-size: 10px;
}
.demo-banner {
  font-size: 11px;
}
.invoice-grand-total td {
  font-weight: 650;
  border-top: 2px solid var(--line);
}
.sidebar nav {
  overflow-y: auto;
  min-height: 0;
}
.sidebar .nav-group {
  margin-bottom: 14px;
}
.sidebar nav a {
  padding-top: 8px;
  padding-bottom: 8px;
}
.sidebar footer {
  flex-shrink: 0;
}
@media (max-width: 850px) {
  .call-layout {
    grid-template-columns: 1fr;
  }
  .call-list {
    max-height: 220px;
  }
  .selection-line {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
}
@media (max-width: 700px) {
  .sidebar nav {
    overflow-x: auto;
    overflow-y: hidden;
  }
  .sidebar .nav-group {
    margin: 0;
  }
  .journey-tools .panel-head {
    align-items: flex-start;
  }
  .map-placeholder iframe {
    height: 260px;
  }
}
.booking-menu {
  position: relative;
}
.booking-menu > div {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 230px;
  background: var(--panel);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 35px #0002;
}
.booking-menu > div button {
  display: block;
  width: 100%;
  margin: 4px 0;
  text-align: left;
}
.supplier-workspace {
  max-width: 1180px;
  margin: auto;
  padding: 30px;
}
.supplier-workspace iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 12px;
}

.email-preview-box {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.email-preview-frame {
  display: block;
  width: 100%;
  height: 560px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f1f4f6;
  margin: 12px 0;
}
.email-envelope p {
  overflow-wrap: anywhere;
  margin: 0;
}
.template-list {
  display: grid;
  gap: 8px;
}
.template-list button {
  text-align: left;
  padding: 14px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.template-list small {
  display: block;
  margin-top: 4px;
}
#templatePlaceholders {
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .email-preview-box {
    padding: 8px;
  }
  .email-preview-frame {
    height: 500px;
  }
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.permission-grid label {
  align-items: flex-start;
}
.booking-owner {
  margin: 14px 0;
}

/* Operational readiness uses the shared light/dark palette. */
.readiness-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 350px;
}
.commercial-history summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}
.commercial-history article {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.supplier-workspace .actions {
  flex-wrap: wrap;
}
.amend-leg {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}
.readiness-tags .badge {
  white-space: normal;
}
@media (max-width: 600px) {
  .toolbar {
    align-items: stretch;
  }
  .toolbar label {
    min-width: 0;
  }
  .commercial-history .actions {
    gap: 8px;
  }
}

.supplier-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.supplier-job-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.supplier-job-card .actions {
  margin-top: 18px;
}
#supplierOperations small {
  display: block;
  margin-top: 5px;
}
#supplierOperations .panel-head {
  gap: 12px;
  flex-wrap: wrap;
}
#supplierOperations .panel-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .supplier-job-card .actions {
    display: grid;
    width: 100%;
  }
  .supplier-job-card .actions button {
    white-space: normal;
    text-align: center;
  }
}

.mail-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 380px;
  overflow: auto;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.itinerary-card {
  position: relative;
  padding: 18px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 3px 12px #00000006;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.itinerary-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.itinerary-card .legtitle {
  font-size: 13px;
  border-radius: 20px;
  padding: 6px 12px;
  background: var(--bg);
}
.itinerary-card .leg-handle {
  font-size: 26px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: grab;
  touch-action: none;
  color: var(--muted);
}
.itinerary-card .leg-route {
  font-size: 16px;
  font-weight: 650;
  overflow-wrap: anywhere;
  margin: 8px 0 18px;
}
.itinerary-card .formgrid > label:nth-child(1),
.itinerary-card .formgrid > label:nth-child(2) {
  position: relative;
  padding-left: 20px;
}
.itinerary-card .formgrid > label:nth-child(1):before,
.itinerary-card .formgrid > label:nth-child(2):before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid #168779;
  border-radius: 50%;
}
.itinerary-card .formgrid > label:nth-child(2):before {
  border-radius: 2px;
  background: #168779;
}
.itinerary-card.leg-dragging {
  border: 2px dashed #168779;
  box-shadow: 0 14px 35px #0002;
  background: var(--bg);
}
.leg-dragging .leg-handle {
  cursor: grabbing;
}
.itinerary-help {
  color: var(--muted);
  font-size: 13px;
}
.sorting {
  user-select: none;
}
@media (max-width: 600px) {
  .itinerary-card {
    padding: 12px;
  }
  .itinerary-card .legbar {
    gap: 4px;
  }
  .itinerary-card .legbar button {
    min-height: 40px;
  }
  .itinerary-card-heading {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .itinerary-card {
    transition: none;
  }
}

.itinerary-card.leg-picked-up {
  pointer-events: none;
  box-shadow:
    0 28px 65px #0004,
    0 8px 20px #0002;
  border-color: #168779;
  will-change: transform;
  transition: box-shadow 0.14s;
  transform-origin: 50% 20%;
  background: var(--panel);
}
.itinerary-drop-slot {
  box-sizing: border-box;
  margin: 16px 0;
  border: 2px dashed #168779;
  border-radius: 16px;
  background: color-mix(in srgb, #168779 8%, var(--panel));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.sorting,
.sorting * {
  cursor: grabbing !important;
}
@media (prefers-reduced-motion: reduce) {
  .itinerary-card.leg-picked-up {
    transition: none;
  }
}

.mail-connection-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}
.mail-connection-strip details {
  margin-left: auto;
  position: relative;
}
.mail-connection-strip details[open] {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.mail-status-dot {
  height: 8px;
  width: 8px;
  background: #a4acb8;
  border-radius: 50%;
  flex-shrink: 0;
}
.mail-status-dot.is-live {
  background: #168779;
}
.mail-workbench {
  display: grid;
  grid-template-columns: 155px 280px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
  min-height: 690px;
}
.mail-views {
  padding: 20px 12px;
  background: var(--bg);
  border-right: 1px solid var(--line);
}
.mail-views > button {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  margin: 5px 0;
  padding: 11px 9px;
  font-size: 12px;
}
.mail-views > button.active {
  background: color-mix(in srgb, #168779 13%, var(--panel));
  color: var(--text);
  box-shadow: inset 3px 0 #168779;
}
.mail-views > button > span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.mail-views label {
  font-size: 11px;
}
.mail-views select {
  width: 100%;
  font-size: 11px;
  padding: 8px;
}
.mail-view-divider {
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.mail-privacy-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.mail-views > a {
  white-space: normal;
  font-size: 11px;
}
.mail-list-pane {
  border-right: 1px solid var(--line);
  min-width: 0;
}
.mail-list-tools {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.mail-search {
  font-size: 11px;
}
.mail-search input {
  margin-top: 6px;
  font-size: 12px;
}
.mail-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.mail-filter-grid label,
.mail-list-caption label {
  font-size: 10px;
}
.mail-filter-grid select,
.mail-list-caption select {
  font-size: 11px;
  padding: 8px;
  min-width: 0;
}
.mail-list-caption {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.mail-list-caption label {
  max-width: 110px;
}
.mail-message-list {
  max-height: 740px;
  overflow: auto;
}
.mail-message-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 18px 16px;
}
.mail-message-row.selected {
  background: color-mix(in srgb, #168779 9%, var(--panel));
  box-shadow: inset 3px 0 #168779;
}
.mail-message-row:hover {
  background: var(--bg);
}
.mail-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.mail-row-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-row-top time {
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.mail-row-subject {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.mail-row-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.mail-row-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.mail-row-bottom .badge {
  font-size: 9px;
}
.mail-row-bottom small {
  font-size: 10px;
}
.mail-list-empty {
  padding: 32px 20px;
  color: var(--muted);
  font-size: 13px;
}
.mail-reader {
  min-width: 0;
}
.mail-reader-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 520px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.mail-reader-empty h2 {
  font-size: 20px;
  color: var(--text);
}
.mail-empty-icon {
  font-size: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}
.mail-reader-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.mail-reader-toolbar > span:last-child {
  margin-left: auto;
}
.mail-reader-content {
  padding: 24px;
  max-height: 960px;
  overflow: auto;
}
.mail-envelope h2 {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.mail-sender {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.mail-sender > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.mail-sender strong {
  font-size: 12px;
}
.mail-sender small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: var(--muted);
}
.mail-sender-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, #168779 15%, var(--panel));
  flex-shrink: 0;
  font-weight: 700;
}
.mail-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.85;
  padding: 24px 0;
  min-height: 150px;
  border-top: 1px solid var(--line);
}
.mail-attachments {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.mail-attachments h3 {
  font-size: 12px;
}
.mail-attachment {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 9px;
  font-size: 11px;
  margin: 4px;
  overflow-wrap: anywhere;
}
.mail-attachments small,
.mail-review-context small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 12px;
}
.mail-review-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 22px;
}
.mail-review-context h3 {
  font-size: 13px;
  margin-top: 22px;
}
.mail-review-context p {
  font-size: 12px;
  color: var(--muted);
}
.mail-review-context label {
  font-size: 11px;
}
.mail-review-context input,
.mail-review-context select {
  font-size: 12px;
}
.mail-review-context .actions {
  margin-top: 14px;
}
.mail-job-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  font-size: 12px;
}
.mail-footnote {
  font-size: 11px;
  margin-top: 14px;
}
.mail-loading {
  padding: 24px;
}
@media (max-width: 1200px) {
  .mail-workbench {
    grid-template-columns: 135px 250px minmax(0, 1fr);
  }
  .mail-review-context {
    grid-template-columns: 1fr;
  }
  .mail-reader-content {
    padding: 18px;
  }
}
@media (max-width: 1000px) {
  .mail-workbench {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .mail-views {
    grid-column: 1/-1;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }
  .mail-views > button {
    width: auto;
    margin: 0;
  }
  .mail-views > .eyebrow,
  .mail-view-divider,
  .mail-privacy-note,
  .mail-views > a {
    display: none;
  }
  .mail-views label {
    margin-left: auto;
    max-width: 200px;
  }
}
@media (max-width: 650px) {
  .mail-workbench {
    display: block;
    min-height: 450px;
  }
  .mail-views {
    display: flex;
  }
  .mail-list-pane {
    border-right: 0;
  }
  .mail-reader {
    display: none;
  }
  .mail-workbench.has-message .mail-reader {
    display: block;
  }
  .mail-workbench.has-message .mail-list-pane,
  .mail-workbench.has-message .mail-views {
    display: none;
  }
  .mail-reader-content {
    max-height: none;
  }
  .mail-message-list {
    max-height: none;
  }
  .mail-connection-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .mail-connection-strip details {
    margin-left: 0;
  }
  .mail-reader-toolbar {
    padding: 12px;
    gap: 8px;
  }
  .mail-reader-toolbar > span:last-child {
    font-size: 10px;
  }
  .mail-envelope h2 {
    font-size: 19px;
  }
  .mail-review-context {
    grid-template-columns: 1fr;
  }
  .mail-views label {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
  }
}

.mail-message-row {
  white-space: normal;
}
.mail-row-subject {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-status {
  --status-ink: #1d4ed8;
  --status-fill: #eff6ff;
  --status-line: #93b4f4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--status-line);
  border-radius: 9px;
  background: var(--status-fill);
  color: var(--status-ink);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 750;
}
.order-status strong {
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit;
}
.order-status-icon {
  font-size: 15px;
  font-weight: 800;
  min-width: 16px;
  text-align: center;
}
.order-status.status-quoted {
  --status-ink: #8a4b08;
  --status-fill: #fff7df;
  --status-line: #e8b84f;
}
.order-status.status-confirmed {
  --status-ink: #086447;
  --status-fill: #e4f6ec;
  --status-line: #6fc69b;
}
.order-status.status-completed {
  --status-ink: #5b3c99;
  --status-fill: #f1ebfc;
  --status-line: #b49bde;
}
.order-status.status-cancelled {
  --status-ink: #aa2632;
  --status-fill: #fff0f1;
  --status-line: #eaa0a8;
}
.orders-table td.title > .order-status {
  display: flex;
  width: fit-content;
  margin: 8px 0 12px;
}
.order-status-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.order-status-caption {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
}
.order-status-panel .order-status {
  font-size: 17px;
  padding: 10px 14px;
}
.drawer-status {
  align-items: center;
  flex-wrap: wrap;
}
.drawer-status .order-status-panel {
  width: 100%;
}
html[data-theme="dark"] .order-status {
  --status-ink: #c0d8ff;
  --status-fill: #203654;
  --status-line: #577aac;
}
html[data-theme="dark"] .order-status.status-quoted {
  --status-ink: #ffdda0;
  --status-fill: #45351e;
  --status-line: #94713d;
}
html[data-theme="dark"] .order-status.status-confirmed {
  --status-ink: #a1e9c2;
  --status-fill: #173e32;
  --status-line: #458a6d;
}
html[data-theme="dark"] .order-status.status-completed {
  --status-ink: #dfcaff;
  --status-fill: #352946;
  --status-line: #8364a4;
}
html[data-theme="dark"] .order-status.status-cancelled {
  --status-ink: #ffbec4;
  --status-fill: #4b2831;
  --status-line: #aa6570;
}
@media (max-width: 650px) {
  .booking-route > .order-status-panel {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
  }
  .order-status-panel .order-status {
    font-size: 15px;
  }
  .orders-table td.title > .order-status {
    font-size: 12px;
  }
}
.booking-route > div:first-child {
  min-width: 0;
}
@media (max-width: 650px) {
  .booking-route {
    flex-wrap: wrap;
  }
  .booking-route > div:first-child {
    width: 100%;
  }
  .booking-route > .order-status-panel {
    flex-basis: 100%;
    min-width: 0;
  }
  .order-status-caption {
    font-size: 10px;
  }
}

/* Private order notes and explicit supplier copies. */
.private-notes {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
}
.private-notes > .panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
}
.private-notes > .panel-head p {
  font-size: 12px;
  color: var(--muted);
  max-width: 540px;
}
.private-notes article {
  background: var(--bg);
  padding: 14px 16px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.private-notes article p,
.supplier-shared-notes p,
.note-selection-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.private-notes article p {
  margin: 8px 0;
  font-size: 13px;
}
.private-notes small {
  font-size: 11px;
  color: var(--muted);
}
.supplier-shared-notes {
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: var(--bg);
  margin: 14px 0;
}
.supplier-shared-notes p {
  font-size: 13px;
  margin: 10px 0;
}
.bid-note-options > summary,
.shared-note-history > summary {
  font-weight: 650;
  cursor: pointer;
  padding: 12px 0;
}
.bid-note-options .checkrow {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 8px 0;
}
.note-selection-body {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 400;
}
.shared-note-history {
  max-width: 330px;
  white-space: normal;
}
.bid-note-options > p {
  font-size: 12px;
  color: var(--muted);
}

/* Always-visible driver details and assignment scope. */
.driver-coverage {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid #c78214;
  border-radius: 16px;
  background: var(--panel);
}
.driver-coverage.is-ready {
  border-left-color: #208765;
}
.driver-coverage-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.driver-coverage-heading h3 {
  margin: 4px 0;
}
.driver-coverage-heading button {
  margin-left: auto;
}
.driver-coverage-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.driver-coverage-fields small,
.driver-coverage-fields strong {
  display: block;
  overflow-wrap: anywhere;
}
.driver-coverage-fields small {
  color: var(--muted);
  margin-bottom: 4px;
}
.driver-coverage p,
.driver-coverage li small {
  color: var(--muted);
  font-size: 13px;
}
.driver-coverage summary {
  cursor: pointer;
  font-weight: 600;
}
.driver-coverage li {
  padding: 8px 0;
  overflow-wrap: anywhere;
}
.driver-coverage li small {
  display: block;
  margin-top: 4px;
}
.leg-driver {
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .driver-coverage-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .driver-coverage-heading button {
    margin-left: 0;
  }
}

.driver-leg-list {
  padding-left: 22px;
}
.driver-leg-list > li {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.driver-leg-choices {
  max-height: 240px;
  overflow: auto;
}
.driver-leg-choices .checkrow {
  align-items: start;
  padding: 8px 0;
  overflow-wrap: anywhere;
}

/* Full-page workflow editor: settings, sequence canvas, selected action. */
.workflow-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.workflow-editor-header h1 {
  margin: 10px 0 4px;
}
.workflow-editor-header p {
  color: var(--muted);
  margin: 0;
}
.workflow-editor-header .actions {
  flex-wrap: wrap;
}
#workflowSaveState {
  font-size: 13px;
  color: var(--muted);
}
.workflow-editor-layout {
  display: grid;
  grid-template-columns: 240px minmax(280px, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.workflow-editor-layout fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.workflow-editor-layout .panel {
  margin: 0;
  padding: 20px;
  min-width: 0;
}
.workflow-editor-layout label {
  display: block;
  margin: 14px 0;
}
.workflow-editor-layout .checkrow {
  display: flex;
  align-items: start;
}
.workflow-editor-layout .muted {
  font-size: 12px;
  line-height: 1.7;
}
.workflow-settings h2,
.workflow-inspector h2,
.workflow-canvas h2 {
  font-size: 17px;
  margin: 0 0 14px;
}
.workflow-palette {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.workflow-palette button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  gap: 8px;
  padding: 12px;
  font-size: 12px;
}
.workflow-canvas {
  padding: 20px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: var(--bg);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 16px 16px;
}
.workflow-canvas-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
#workflowStepCount {
  font-size: 12px;
  color: var(--muted);
}
.workflow-terminal {
  margin: 18px auto;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
}
.workflow-canvas .workflow-step {
  position: relative;
  margin: 24px 0;
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
  box-shadow: 0 3px 10px #00000007;
}
.workflow-canvas .workflow-step.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 15%, transparent);
}
.workflow-canvas .workflow-step:after {
  content: "↓";
  position: absolute;
  top: 100%;
  left: calc(50% - 6px);
  display: block;
  margin: 0;
  line-height: 24px;
}
.workflow-canvas .workflow-step.leg-picked-up:after {
  display: none;
}
.workflow-action-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.workflow-action-heading .leg-handle {
  padding: 4px;
  flex: 0 0 25px;
  touch-action: none;
}
.workflow-action-icon {
  color: var(--brand);
  font-size: 20px;
}
.workflow-select {
  display: block;
  text-align: left;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.workflow-select strong,
.workflow-select small {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}
.workflow-select small {
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
  font-size: 11px;
}
.workflow-move {
  display: flex;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.workflow-move button {
  padding: 4px 9px;
  font-size: 12px;
}
.workflow-move [data-remove] {
  margin-left: auto;
}
.workflow-inspector {
  position: sticky;
  top: 20px;
  scroll-margin-top: 20px;
}
.workflow-inspector textarea {
  min-height: 280px;
  resize: vertical;
}
.workflow-inspector .notice {
  margin-top: 18px;
  font-size: 12px;
}
@media (max-width: 1200px) {
  .workflow-editor-layout {
    grid-template-columns: 200px minmax(250px, 1fr) 280px;
    gap: 12px;
  }
  .workflow-editor-layout .panel,
  .workflow-canvas {
    padding: 14px;
  }
}
@media (max-width: 1100px) {
  .workflow-editor-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .workflow-settings {
    grid-column: 1/-1;
  }
  .workflow-settings fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .workflow-settings h3 {
    grid-column: 1/-1;
  }
}
@media (max-width: 650px) {
  .workflow-editor-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .workflow-settings fieldset {
    display: block;
  }
  .workflow-inspector {
    position: static;
  }
  .workflow-editor-header .actions {
    width: 100%;
    justify-content: space-between;
  }
  .workflow-canvas {
    padding: 16px;
  }
}

/* Bank reconciliation uses the same theme tokens as the staff workspace. */
.bank-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.bank-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.bank-tabs button[aria-pressed="true"] {
  border-color: var(--brand);
  box-shadow: inset 0 -2px var(--brand);
}
.bank-payment-summary strong {
  font-size: 2rem;
}
.bank-payment-summary p {
  overflow-wrap: anywhere;
}

.bank-overview small,
.bank-payment-summary small {
  display: block;
  margin-top: 6px;
}

@media (max-width: 760px) {
  .bank-ledger .tablewrap {
    overflow: visible;
  }
  .bank-ledger table,
  .bank-ledger tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .bank-ledger thead {
    display: none;
  }
  .bank-ledger tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--line);
  }
  .bank-ledger tr:last-child {
    border-bottom: 0;
  }
  .bank-ledger td {
    display: block;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .bank-ledger td:nth-child(1) {
    grid-row: 2;
    grid-column: 1;
    font-size: 12px;
  }
  .bank-ledger td:nth-child(2) {
    grid-row: 1;
    grid-column: 1 / -1;
    font-weight: 600;
  }
  .bank-ledger td:nth-child(3) {
    grid-row: 2;
    grid-column: 2;
    font-size: 18px;
    font-weight: 650;
  }
  .bank-ledger td:nth-child(4) {
    grid-row: 3;
    grid-column: 1 / -1;
  }
  .bank-ledger td:nth-child(5) {
    grid-row: 4;
    grid-column: 1 / -1;
  }
  .bank-ledger td:nth-child(5) button {
    width: 100%;
  }
}

/* Admin log workspace: category navigation and readable diagnostic detail. */
.logs-workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.logs-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: sticky;
  top: 80px;
}
.logs-menu button {
  text-align: left;
  padding: 12px;
}
.logs-menu button.active {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--panel);
}
.logs-main {
  min-width: 0;
}
.logs-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.logs-filters > label:first-child {
  grid-column: 1 / -1;
}
.logs-filters .actions {
  grid-column: 1 / -1;
}
.logs-filters input,
.logs-filters select {
  width: 100%;
  min-width: 0;
}
.logs-filters #logFileFilter label {
  display: block;
}
#logsStatus {
  margin: 16px 0;
  color: var(--muted);
}
.logs-summary {
  white-space: normal;
  min-width: 180px;
  max-width: 450px;
  overflow-wrap: anywhere;
}
.logs-summary small {
  display: block;
}
.logs-detail {
  padding: 26px;
}
.logs-detail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
}
.logs-detail code {
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .logs-workspace {
    grid-template-columns: 1fr;
  }
  .logs-menu {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .logs-menu button {
    flex: 1 0 140px;
  }
}
@media (max-width: 600px) {
  .logs-filters {
    grid-template-columns: 1fr 1fr;
  }
  .logs-results table {
    min-width: 640px;
  }
  .logs-detail {
    padding: 16px;
  }
  .logs-pagination {
    flex-wrap: wrap;
  }
}

.logs-workspace .logs-menu button {
  white-space: normal;
  text-align: left;
}
@media (max-width: 600px) {
  .logs-workspace .logs-results .tablewrap {
    overflow: visible;
  }
  .logs-workspace .logs-results table,
  .logs-results tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .logs-results thead {
    display: none;
  }
  .logs-results tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }
  .logs-results td {
    display: block;
    min-width: 0;
    max-width: none;
    border: 0;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .logs-results td:nth-child(3) {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .logs-results td:nth-child(4) {
    grid-row: 3;
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--muted);
  }
  .logs-results td:nth-child(5) {
    grid-row: 4;
    grid-column: 1 / -1;
  }
  .logs-results td:nth-child(5) button {
    width: 100%;
  }
}
