:root {
  --ink: #17252d;
  --muted: #708087;
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --navy: #102d3a;
  --teal: #0d8277;
  --mint: #d9efe7;
  --coral: #ef765f;
  --line: #dce7e2;
  --shadow: 0 20px 55px rgba(22, 52, 60, 0.08);
}

* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
}
.dashboard {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  width: 274px;
  flex: 0 0 274px;
  min-height: 100vh;
  padding: 30px 22px 24px;
  color: #fff;
  background: var(--navy);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--mint);
  border-radius: 12px;
  font:
    700 16px "Space Grotesk",
    sans-serif;
  letter-spacing: -0.1em;
}
.brand-kicker,
.eyebrow,
.nav-label {
  margin: 0;
  color: #8eaea7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.brand-kicker {
  margin-bottom: 3px;
}
.brand h2 {
  margin: 0;
  color: #fff;
  font:
    700 18px "Space Grotesk",
    sans-serif;
}
.sidebar-caption {
  margin: 34px 7px 38px;
  color: #a6c0ba;
  font-size: 13px;
  line-height: 1.6;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-label {
  margin: 0 12px 8px;
}
.nav-button {
  width: 100%;
  padding: 13px 14px;
  color: #b8cfca;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 14px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.nav-button span {
  width: 20px;
  color: #7ea39d;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}
.nav-button:hover,
.nav-button.active {
  color: #fff;
  background: rgba(217, 239, 231, 0.12);
}
.nav-button.active {
  box-shadow: inset 3px 0 var(--coral);
}
.nav-button.active span {
  color: var(--mint);
}
.sidebar-footer {
  margin-top: auto;
  padding: 15px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.sidebar-footer small {
  display: block;
  margin-top: 3px;
  color: #8eaaa5;
  font-size: 11px;
}
.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5fd39d;
  box-shadow: 0 0 0 4px rgba(95, 211, 157, 0.12);
}

.main-content {
  width: 100%;
  min-width: 0;
  max-width: 1500px;
  padding: 28px clamp(24px, 5vw, 78px) 60px;
  background: radial-gradient(
    circle at 95% 2%,
    rgba(217, 239, 231, 0.85),
    transparent 24rem
  );
}
.section {
  display: none;
  width: 100%;
}
.section.active {
  display: block;
  animation: section-in 0.35s ease both;
}
@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 58px;
}
.topbar .eyebrow {
  color: #82928f;
}
.date-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.date-block strong {
  color: var(--ink);
  font:
    600 13px "Space Grotesk",
    sans-serif;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 9px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  font:
    700 11px "Space Grotesk",
    sans-serif;
}
.user-chip b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--mint);
  border-radius: 50%;
  font-size: 10px;
}
.user-chip span {
  color: var(--muted);
  font:
    500 12px "DM Sans",
    sans-serif;
}
.hero-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 67px;
}
.hero-copy h1,
.page-heading h1 {
  max-width: 700px;
  margin: 9px 0 15px;
  color: var(--ink);
  font:
    700 clamp(36px, 5vw, 62px)/1.02 "Space Grotesk",
    sans-serif;
  letter-spacing: -0.055em;
}
.hero-copy h1 em {
  color: var(--teal);
  font-style: normal;
}
.hero-copy p,
.page-heading p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.accent {
  color: var(--coral);
}
.hero-action,
.back-button {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.hero-action {
  padding: 14px 18px;
  color: #fff;
  background: var(--navy);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-weight: 700;
}
.hero-action:hover {
  background: var(--teal);
  transform: translateY(-2px);
}
.hero-action span {
  color: var(--mint);
  font-size: 21px;
  line-height: 0;
}
.dashboard-grid {
  max-width: 1060px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin: 6px 0 0;
  font:
    600 24px "Space Grotesk",
    sans-serif;
  letter-spacing: -0.04em;
}
.live-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.card {
  min-height: 192px;
  padding: 22px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.card:hover,
.card:focus-visible {
  border-color: transparent;
  outline: 0;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.card-topline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 23px;
}
.card-icon.blue {
  color: #2379b6;
  background: #e5f2fa;
}
.card-icon.green {
  color: var(--teal);
  background: var(--mint);
}
.card-icon.coral {
  color: #d65a47;
  background: #fde8e1;
}
.card-arrow {
  color: #99a9a6;
  font-size: 20px;
}
.card-label {
  margin-top: 28px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.card strong {
  margin: 6px 0 7px;
  font:
    600 17px "Space Grotesk",
    sans-serif;
}
.card > span:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 15px;
  margin-top: 33px;
}
.route-banner {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 25px;
  color: #fff;
  background: var(--teal);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.route-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.route-banner .eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #a9ddd1;
}
.route-banner strong {
  font:
    600 18px "Space Grotesk",
    sans-serif;
}
.route-stops {
  width: min(100%, 330px);
  display: flex;
  align-items: center;
  gap: 12px;
  font:
    700 18px "Space Grotesk",
    sans-serif;
}
.route-stops i {
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.65);
  position: relative;
}
.route-stops i::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  top: -3px;
  right: 0;
  background: #fff;
  border-radius: 50%;
}
.status-panel {
  min-height: 150px;
  padding: 23px 25px;
  color: #fff;
  background: var(--navy);
  border-radius: 10px;
}
.status-panel .eyebrow {
  color: #8eaea7;
}
.status-panel strong {
  display: block;
  margin: 16px 0 8px;
  font:
    600 18px "Space Grotesk",
    sans-serif;
}
.status-panel p {
  margin: 0;
  color: #abc3be;
  font-size: 13px;
  line-height: 1.55;
}
.route-line {
  margin-left: auto;
  color: #dcf5ed;
  font:
    600 13px "Space Grotesk",
    sans-serif;
}
.route-meta {
  color: #b4e2d7;
  font-size: 11px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 50px 0 35px;
}
.page-heading h1 {
  font-size: clamp(34px, 5vw, 52px);
}
.back-button {
  padding: 11px 15px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
}
.back-button:hover {
  color: var(--teal);
  border-color: var(--teal);
}

#bookingForm,
#cancelForm,
.table-container {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
#bookingForm {
  max-width: 900px;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.form-group input,
.form-group select {
  min-width: 0;
  padding: 12px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  font-size: 15px;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(12, 130, 117, 0.1);
}
.book-button {
  grid-column: 1 / -1;
  padding: 14px;
  color: #fff;
  background: var(--teal);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}
.book-button:hover {
  background: var(--navy);
}
.table-container {
  width: 100%;
  padding: 8px;
  overflow-x: auto;
}
#bookingsTable {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
#bookingsTable th {
  padding: 12px;
  color: #fff;
  background: var(--navy);
  text-align: left;
  font:
    600 11px "Space Grotesk",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#bookingsTable td {
  padding: 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
#bookingsTable tr:hover {
  background: #eff8f4;
}
#cancelForm {
  max-width: 500px;
  padding: 28px;
}
#cancelForm .form-group {
  margin-bottom: 20px;
}
.cancel-button {
  width: 100%;
  padding: 14px;
  color: #fff;
  background: var(--coral);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}
.cancel-button:hover {
  background: #d45d49;
}

@media (max-width: 900px) {
  .sidebar {
    width: 230px;
    flex-basis: 230px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .dashboard-lower {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .dashboard {
    display: block;
  }
  .sidebar {
    width: 100%;
    min-height: 0;
    padding: 18px;
  }
  .sidebar-caption,
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-top: 18px;
  }
  .nav-label {
    display: none;
  }
  .nav-button {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px;
    text-align: center;
    font-size: 11px;
  }
  .main-content {
    padding: 20px 16px 40px;
  }
  .topbar {
    margin-bottom: 38px;
    align-items: flex-start;
    gap: 16px;
  }
  .user-chip span {
    display: none;
  }
  .hero-copy,
  .page-heading {
    display: block;
  }
  .hero-action,
  .back-button {
    margin-top: 22px;
  }
  .hero-copy h1 {
    font-size: 42px;
  }
  .dashboard-lower {
    grid-template-columns: 1fr;
  }
  #bookingForm {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .book-button {
    grid-column: auto;
  }
}
