:root {
  color-scheme: light;
  --ink: #112746;
  --muted: #546a86;
  --blue: #1859aa;
  --blue-dark: #114783;
  --nav: #102541;
  --line: #d9e4f2;
  --surface: #fff;
  --bg: #f1f6fd;
  font: 15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

[hidden] {
  display: none!important;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,h2,p {
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem,3vw,2.35rem);
  line-height: 1.14;
  letter-spacing: -.04em;
}

h2 {
  font-size: 1.14rem;
  letter-spacing: -.02em;
}

p,small {
  color: var(--muted);
}

small {
  display: block;
}

button,input,select {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .63rem .86rem;
  border: 1px solid #b9cce4;
  border-radius: 8px;
  background: #fff;
  color: #173761;
  font-weight: 650;
  cursor: pointer;
  min-height: 40px;
}

button:hover {
  border-color: #3676c2;
  background: #f2f7fd;
}

button:disabled {
  opacity: .55;
  cursor: default;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline: 3px solid #73a8e8;
  outline-offset: 2px;
}

button.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

button.primary:hover {
  background: var(--blue-dark);
}

button.danger {
  color: #922025;
  border-color: #ecc7c7;
}

.brand {
  display: flex;
  gap: .7rem;
  align-items: center;
  min-width: max-content;
}

.brand strong,.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.23;
}

.brand small {
  font-size: .77rem;
  color: inherit;
  opacity: .72;
}

.mark {
  display: grid;
  place-items: center;
  background: #19569a;
  color: white;
  border-radius: 11px;
  width: 43px;
  height: 43px;
  letter-spacing: -.05em;
  font-weight: 850;
  font-size: 1rem;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem max(5vw,1rem);
  background: white;
  border-bottom: 1px solid var(--line);
}

.public-header a {
  display: flex;
  gap: .45rem;
  align-items: center;
  font-weight: 650;
}

.public-shell {
  width: min(1050px,100% - 2rem);
  margin: clamp(2.5rem,8vw,7rem) auto;
  display: grid;
  grid-template-columns: 1fr minmax(300px,430px);
  gap: 3rem;
  align-items: center;
}

.public-copy h1 {
  font-size: clamp(2.4rem,6vw,4.6rem);
  font-weight: 760;
  letter-spacing: -.065em;
}

.public-copy p {
  margin-top: 1rem;
  font-size: 1.1rem;
  max-width: 29rem;
}

.public-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: #dbeafb;
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
}

.public-icon svg {
  width: 31px;
  height: 31px;
}

.login-shell {
  width: min(100% - 2rem,470px);
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 2px 5px #26355308;
}

.panel>p {
  margin: .45rem 0 .8rem;
}

.tracker {
  padding: 1.5rem;
}

.tracker form {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.track-result {
  margin-top: 1rem;
  background: #eaf5ee;
  border: 1px solid #bedbcc;
  border-radius: 8px;
  padding: 1rem;
}

.track-result strong {
  color: #155b3f;
}

.workspace {
  display: grid;
  grid-template-columns: 224px minmax(0,1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.3rem;
  padding: 1.1rem .85rem;
  background: var(--nav);
  color: #eef5ff;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  padding: 0 .35rem;
}

.sidebar nav {
  display: grid;
  gap: .35rem;
}

.sidebar button {
  justify-content: flex-start;
  color: #d9e9ff;
  background: transparent;
  border-color: transparent;
  white-space: nowrap;
}

.sidebar button:hover,.sidebar button.active {
  background: #dceaff;
  color: #103d78;
}

.sidebar>a {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem;
  color: #d9e9ff;
}

.workspace-main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1.35rem;
  background: white;
  border-bottom: 1px solid var(--line);
  font-weight: 680;
}

.topbar>div {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--muted);
}

.topbar button {
  font-size: .85rem;
  min-height: 34px;
}

.workspace-main main {
  padding: clamp(1rem,2vw,2rem);
  max-width: 1450px;
  margin: auto;
}

.heading,.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1rem;
}

.heading p {
  margin-top: .35rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.stat {
  display: grid;
  gap: .35rem;
}

.stat svg {
  color: var(--blue);
  margin-bottom: .2rem;
}

.stat span {
  color: var(--muted);
  font-size: .87rem;
}

.stat strong {
  font-size: 1.55rem;
  letter-spacing: -.04em;
}

.workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.workspace .panel+.panel {
  margin-top: 1rem;
}

.cards .panel+.panel,.stack .panel+.panel,.booking .panel+.panel {
  margin-top: 0;
}

.booking {
  display: grid;
  grid-template-columns: minmax(0,2.15fr) minmax(230px,1fr);
  gap: 1rem;
  align-items: start;
}

.stack {
  display: grid;
  gap: 1rem;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .85rem;
  margin: 1rem 0;
}

.fields p {
  margin-top: .2rem;
}

label {
  display: grid;
  gap: .3rem;
  align-content: start;
  font-weight: 630;
  color: #284667;
  font-size: .91rem;
}

input,select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #bacbe0;
  border-radius: 7px;
  padding: .55rem .65rem;
  background: #fff;
  color: var(--ink);
}

.check {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin: .75rem 0;
}

.check input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--blue);
}

.quote {
  position: sticky;
  top: 1rem;
}

.quote p {
  margin: .7rem 0;
}

.quote dl {
  font-size: .92rem;
  margin: 0;
}

.quote dl div,.total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.quote dd {
  margin: 0;
}

.total {
  border-top: 1px solid var(--line);
  padding: .75rem 0;
  margin-top: .75rem;
  align-items: center;
}

.total strong {
  font-size: 1.35rem;
}

.quote button {
  width: 100%;
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}

th,td {
  padding: .75rem .6rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: .82rem;
  color: #4e6885;
  background: #f4f8fe;
}

.text-btn {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  color: var(--blue);
  font-weight: 720;
}

td small {
  margin-top: .2rem;
}

.search {
  display: flex;
  gap: .6rem;
  align-items: end;
  margin: .8rem 0;
}

.search label {
  width: min(100%,320px);
}

.badge {
  display: inline-block;
  border-radius: 100px;
  background: #e5edf9;
  color: #204878;
  padding: .24rem .57rem;
  font-size: .8rem;
  font-weight: 700;
}

.badge.dispatched {
  background: #e3edff;
  color: #174b9b;
}

.badge.arrived,.badge.collected {
  background: #e2f3e9;
  color: #1d6246;
}

.badge.cancelled {
  background: #f9e9e8;
  color: #982d35;
}

.pager,.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: .8rem 0;
}

.route-list {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.route-list button {
  justify-content: flex-start;
  text-align: left;
  flex-wrap: wrap;
}

.route-list button span {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
}

.route-list small {
  margin-left: .5rem;
}

.action-form {
  max-width: 455px;
  background: #f1f7fe;
  border-radius: 8px;
  padding: 1rem;
  display: grid;
  gap: .7rem;
}

.receipt h2 {
  margin: .8rem 0 0;
}

.route-heading {
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 720;
}

.events {
  padding-left: 1.3rem;
}

.events li {
  margin: .6rem 0;
}

.events li span {
  display: block;
}

.error {
  color: #9d2630;
  background: #fff0f1;
  border-radius: 6px;
  padding: .55rem;
}

#notice {
  margin: .6rem 0;
  color: #204a7c;
}

.loading {
  padding: 3rem;
}

.print-only {
  display: none;
}

@media(max-width:850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
    gap: .7rem;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .sidebar>a {
    display: none;
  }
  .sidebar button {
    font-size: .83rem;
    padding: .45rem .6rem;
    min-height: 35px;
  }
  .sidebar button svg {
    width: 15px;
  }
  .cards {
    grid-template-columns: repeat(2,1fr);
  }
}

@media(max-width:620px) {
  .public-shell,.booking {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .quote {
    position: static;
  }
  .fields {
    gap: .6rem;
  }
  .public-header {
    align-items: flex-start;
  }
  .public-header a {
    font-size: .85rem;
  }
  .tracker {
    padding: 1rem;
  }
  .receipt-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }
  .sidebar,.topbar,.heading,.no-print,.search,.pager,#notice,.panel-head button {
    display: none!important;
  }
  .workspace {
    display: block;
  }
  .workspace-main main {
    padding: 0;
  }
  .panel {
    border: 0;
    box-shadow: none;
    padding: .2rem;
  }
  .print-only {
    display: block;
  }
}
