#wdp-planner {
  --wdp-primary: #1a5276;
  --wdp-navy: #1a5276;
  --wdp-primary-light: #d6eaf8;
  --wdp-primary-dark: #154360;
  --wdp-accent: #f59e0b;
  --wdp-accent-light: #fff8e6;
  --wdp-success: #16a34a;
  --wdp-success-light: #effbf3;
  --wdp-danger: #dc2626;
  --wdp-danger-light: #fdecec;
  --wdp-neutral: #6b7280;
  --wdp-border: #d7dde5;
  --wdp-bg: #f7f9fc;
  --wdp-card: #ffffff;
  --wdp-text: #17202a;
  --wdp-shadow: 0 10px 28px rgba(23, 32, 42, 0.08);
  --wdp-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--wdp-text);
  background: var(--wdp-bg);
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

#wdp-planner,
#wdp-planner *,
#wdp-planner *::before,
#wdp-planner *::after {
  box-sizing: border-box;
}

.wdp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--wdp-card);
  border-bottom: 1px solid var(--wdp-border);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 4px 18px rgba(23, 32, 42, 0.06);
}

.wdp-header__left,
.wdp-header__right,
.wdp-inline-form,
.wdp-crew-bar,
.wdp-tabs,
.wdp-run-card__meta,
.wdp-row__detail-grid,
.wdp-fleet-row,
.wdp-inline-form--fleet {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.wdp-title,
.wdp-run-card__title,
.wdp-agenda-card h3,
.wdp-fleet-manager h3 {
  margin: 0;
}

.wdp-small,
.wdp-row__code,
.wdp-row__summary,
.wdp-run-card__meta,
.wdp-agenda-run,
.wdp-queue-pill {
  color: var(--wdp-neutral);
  font-size: 0.75rem;
}

.wdp-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.wdp-date-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wdp-date-step {
  min-width: 36px;
  padding: 0 8px;
  font-size: 1.4rem;
  line-height: 1;
}

/* Clickable date label — overlay the native input so the whole area opens the picker */
.wdp-date-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--wdp-border);
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  min-height: 32px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wdp-text);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}
.wdp-date-label .wdp-date-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  min-width: unset;
  padding: 0;
}

.wdp-date-input {
  min-height: 32px;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--wdp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--wdp-text);
  min-width: 160px;
  font-size: 0.85rem;
}
.wdp-inline-form input,
.wdp-inline-form select,
.wdp-fleet-row input,
.wdp-assign-select {
  min-height: 32px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--wdp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--wdp-text);
}

.wdp-network,
.wdp-queue-pill,
.wdp-badge,
.wdp-tag,
.wdp-gear-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.wdp-network--online,
.wdp-badge--paid,
.wdp-gear-signal--light {
  background: #e8f7ed;
  color: var(--wdp-success);
}

.wdp-network--offline,
.wdp-badge--pending,
.wdp-gear-signal--medium {
  background: var(--wdp-accent-light);
  color: #9a640d;
}

.wdp-seats { font-weight: 600; }
.wdp-seats--light  { color: #16a34a; }
.wdp-seats--medium { color: #d97706; }
.wdp-seats--heavy  { color: #dc2626; }

.wdp-badge--checkedin,
.wdp-gear-signal--heavy {
  background: #e7eefc;
  color: var(--wdp-primary);
}

.wdp-notice,
.wdp-crew-bar,
.wdp-fleet-manager,
.wdp-run-card,
.wdp-agenda-card,
.wdp-row,
.wdp-install-banner {
  margin: 0.35rem 0.5rem;
  padding: 0.4rem;
  background: var(--wdp-card);
  border: 1px solid var(--wdp-border);
  border-radius: var(--wdp-radius);
  box-shadow: var(--wdp-shadow);
}

.wdp-notice {
  padding: 0.4rem 0.6rem;
}

.wdp-notice--success {
  border-color: #9fd3af;
  background: var(--wdp-success-light);
}

.wdp-notice--warn {
  border-color: #f0c46b;
  background: var(--wdp-accent-light);
}

.wdp-notice--error {
  border-color: #f2aaa6;
  background: var(--wdp-danger-light);
}

.wdp-crew-bar,
.wdp-fleet-manager {
  padding: 0.35rem 0.5rem;
}

.wdp-crew-bar__checks {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.wdp-crew-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--wdp-border);
  border-radius: 999px;
  background: #fff;
}

.wdp-crew-chip input {
  width: 22px;
  height: 22px;
}

.wdp-chip-remove {
  border: none;
  background: transparent;
  color: var(--wdp-danger);
  cursor: pointer;
  font-weight: 700;
}

.wdp-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0 0.5rem;
  margin: 0 0 0.5rem;
  scroll-snap-type: x proximity;
}

.wdp-tab {
  min-height: 32px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--wdp-border);
  border-radius: 999px;
  background: #fff;
  color: var(--wdp-neutral);
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
}

.wdp-tab--active {
  background: var(--wdp-primary);
  border-color: var(--wdp-primary);
  color: #fff;
}

.wdp-tab-content,
.wdp-booking-list,
.wdp-run-list,
.wdp-agenda-list {
  display: grid;
  gap: 0.5rem;
}

.wdp-row,
.wdp-run-card,
.wdp-agenda-card {
  padding: 0.35rem 0.5rem;
}

.wdp-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.wdp-row--hold {
  border-left: 4px solid var(--wdp-accent);
  background: var(--wdp-accent-light);
}

.wdp-row--checkedin {
  border-left: 4px solid var(--wdp-success);
  background: var(--wdp-success-light);
}

.wdp-row__main {
  display: grid;
  gap: 0.3rem;
}

.wdp-row__name {
  font-size: 0.85rem;
  font-weight: 700;
}

.wdp-row__actions .wdp-btn {
  width: 100%;
}

.wdp-row__details {
  border-top: 1px solid var(--wdp-border);
  padding-top: 0.65rem;
}

.wdp-row__details summary,
.wdp-run-card__details summary,
.wdp-fleet-manager summary {
  cursor: pointer;
  font-weight: 700;
}

.wdp-row__detail-grid {
  display: grid;
  gap: 0.5rem 1rem;
  margin-top: 0.4rem;
}

.wdp-row__detail-full {
  grid-column: 1 / -1;
}

.wdp-tag {
  background: #eef4fb;
  color: var(--wdp-primary);
  margin-right: 0.35rem;
}

.wdp-tag--warn {
  background: var(--wdp-danger-light);
  color: var(--wdp-danger);
}

.wdp-btn {
  min-height: 32px;
  min-width: 32px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--wdp-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.wdp-btn--secondary {
  background: #edf2f7;
  border-color: var(--wdp-border);
  color: var(--wdp-text);
}

.wdp-btn--checkin {
  background: var(--wdp-primary);
}

.wdp-btn--checkout {
  background: var(--wdp-success);
}

.wdp-btn--done {
  background: #a5b1bf;
}
.wdp-btn--undo {
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
}
.wdp-btn--undo {
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
}

.wdp-run-card__header {
  display: grid;
  gap: 0.85rem;
}

.wdp-run-card__details {
  margin-top: 0.8rem;
  border-top: 1px solid var(--wdp-border);
  padding-top: 0.8rem;
}

.wdp-run-card__bookings {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.wdp-agenda-run__gear {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.75rem;
}

.wdp-agenda-run__gear {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.75rem;
}

.wdp-run-card__booking,
.wdp-agenda-run,
.wdp-fleet-row {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--wdp-border);
  border-radius: 8px;
  background: #fbfcfe;
}

.wdp-fleet-manager__body {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.wdp-fleet-list {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.wdp-fleet-row {
  display: grid;
  gap: 0.4rem;
}

.wdp-fleet-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.wdp-agenda-list {
  grid-template-columns: 1fr;
}

.wdp-install-banner {
  position: sticky;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--wdp-primary-dark);
  color: #fff;
}

.wdp-loading,
.wdp-error,
.wdp-empty {
  margin: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: #fff;
  border: 1px solid var(--wdp-border);
  border-radius: var(--wdp-radius);
}

@media (min-width: 600px) {
  .wdp-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .wdp-row__actions {
    min-width: 180px;
  }

  .wdp-row__actions .wdp-btn {
    width: auto;
  }

  .wdp-row__detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wdp-fleet-row,
  .wdp-inline-form--fleet {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    display: grid;
  }
}

@media (min-width: 900px) {
  .wdp-run-list,
  .wdp-agenda-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wdp-fleet-manager__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ─── Summary Tab ─────────────────────────────────────────────────────────── */
.wdp-summary {
  padding: 0.35rem 0.5rem;
}

.wdp-summary__date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wdp-primary-dark);
  margin: 0 0 1rem;
}

.wdp-summary__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wdp-sum-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
  background: var(--wdp-card);
  border: 1px solid var(--wdp-border);
  border-radius: var(--wdp-radius);
  overflow: hidden;
}

.wdp-sum-table th,
.wdp-sum-table td {
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--wdp-border);
  white-space: nowrap;
}

.wdp-sum-slot {
  background: var(--wdp-primary-light);
  color: var(--wdp-primary-dark);
  font-weight: 700;
  text-align: center;
}

.wdp-sum-sub {
  background: #eef4fb;
  color: var(--wdp-neutral);
  font-weight: 600;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.wdp-sum-label {
  font-weight: 500;
  color: var(--wdp-text);
  min-width: 12rem;
}

.wdp-sum-cell {
  text-align: center;
  color: var(--wdp-text);
}

.wdp-sum-table td {
  text-align: center;
  color: var(--wdp-text);
}

.wdp-sum-table td.wdp-sum-label {
  text-align: left;
}

.wdp-sum-total {
  font-weight: 700;
  background: #f0f4f9;
  color: var(--wdp-primary-dark);
  text-align: center;
}

.wdp-sum-group td {
  background: var(--wdp-bg);
  color: var(--wdp-neutral);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  text-align: left;
}

/* ─── Compact booking list ───────────────────────────────────────────────── */

/* ─── Departure grouping headers ─────────────────────────────────────────── */
.wdp-departure-groups {
  display: grid;
  gap: 1rem;
}

.wdp-departure-time-group {
  display: grid;
  gap: 0.5rem;
}

.wdp-group-time {
  margin: 0.5rem 1rem 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--wdp-primary-dark);
  border-bottom: 2px solid var(--wdp-primary-light);
  padding-bottom: 0.25rem;
}

.wdp-departure-dest-group {
  display: grid;
  gap: 0.25rem;
}

.wdp-group-dest {
  margin: 0 1rem 0.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wdp-neutral);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Run-sheet time group header ────────────────────────────────────────── */
.wdp-group-header {
  margin: 0.75rem 0 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wdp-primary-dark);
  background: var(--wdp-primary-light);
  border-radius: var(--wdp-radius);
}

.wdp-booking-list {
  gap: 0;
  margin: 0 1rem 0.5rem;
  background: var(--wdp-card);
  border: 1px solid var(--wdp-border);
  border-radius: var(--wdp-radius);
  overflow: hidden;
}

.wdp-booking-list .wdp-row {
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--wdp-border);
  box-shadow: none;
  padding: 0.4rem 0.65rem;
  gap: 0.35rem;
}

.wdp-booking-list .wdp-row:last-child {
  border-bottom: none;
}

.wdp-booking-list .wdp-row--hold {
  border-left: 4px solid var(--wdp-accent);
}

.wdp-booking-list .wdp-row--checkedin {
  border-left: 4px solid var(--wdp-success);
}

.wdp-booking-list .wdp-row__main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.65rem;
  align-items: baseline;
}

.wdp-booking-list .wdp-row__name {
  font-size: 0.9rem;
}

@media (min-width: 600px) {
  .wdp-booking-list .wdp-row {
    grid-template-columns: 1fr auto auto;
    align-items: center;
    padding: 0.3rem 0.65rem;
  }

  .wdp-booking-list .wdp-row__details {
    grid-column: 1 / -1;
  }

  .wdp-booking-list .wdp-row__actions .wdp-btn {
    min-height: 34px;
    padding: 0 0.6rem;
    font-size: 0.75rem;
  }
}

/* ─── Summary toolbar ────────────────────────────────────────────────────── */
.wdp-summary__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.wdp-summary__toolbar .wdp-summary__date {
  margin: 0;
}

.wdp-btn--print {
  font-size: 0.75rem;
  min-height: 34px;
}

/* ─── Print styles ───────────────────────────────────────────────────────── */

/* ─── Print Packet Styles ─────────────────────────────────────────────────── */
.wdp-print-area {
  display: none;
}
.wdp-btn--print {
  background: var(--wdp-card);
  border-color: var(--wdp-primary);
  color: var(--wdp-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
@media print {
  /* Hide the main UI from print */
  #wdp-planner > section.wdp-header,
  #wdp-planner > div.wdp-crew-bar,
  #wdp-planner > div.wdp-fleet-manager,
  #wdp-planner > .wdp-tabs,
  #wdp-planner > .wdp-tab-content,
  #wdp-planner > .wdp-install-banner,
  #wdp-sys-notices,
  .wdp-btn,
  .wdp-row__actions {
    display: none !important;
  }
  
  /* Reset container backgrounds for paper */
  body, html, #wdp-planner, .wdp-run-card, .wdp-agenda-card, .wdp-row {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Show print packet */
  .wdp-print-area {
    display: block !important;
    width: 100% !important;
  }
  
  /* Print formatting */
  .wdp-print-header {
    text-align: center;
    border-bottom: 2px solid #000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
  .wdp-print-area h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }
  
  /* Open all details statically for print */
  details.wdp-row__details, details.wdp-run-card__details {
    display: block !important;
  }
  details summary {
    display: none !important; /* hide the toggle caret */
  }
  
  .wdp-run-card, .wdp-row, .wdp-agenda-card {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid #999 !important;
    margin-bottom: 0.5rem !important;
    padding: 0.4rem !important;
  }
  .wdp-row__detail-grid {
    margin-top: 0.3rem !important;
  }
  .wdp-sum-table th, .wdp-sum-table td {
    border: 1px solid #666 !important;
    color: #000 !important;
    padding: 0.2rem 0.3rem !important;
  }
  .wdp-sum-slot, .wdp-sum-total {
    background: #e6e6e6 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .wdp-tag, .wdp-network, .wdp-queue-pill, .wdp-badge, .wdp-gear-signal {
    border: 1px solid #999;
    color: #000 !important;
    background: transparent !important;
  }
  .wdp-notice--warn {
    border: 1px solid #666 !important;
    background: transparent !important;
    font-weight: bold;
  }
}


/* Spreadsheet Summary */
.wdp-text-center { text-align: center; }
.wdp-muted { color: var(--color-gray-dark); opacity: 0.5; }
.wdp-matrix-totals th, .wdp-matrix-totals td {
  background-color: var(--color-gray-light);
  border-top: 2px solid var(--color-gray-dark);
}
.wdp-summary-grid { 
  overflow-x: auto; 
  margin-top: 1rem; 
  background: white; 
  border: 1px solid var(--color-gray-light); 
  border-radius: var(--radius-md);
}
.wdp-matrix td { white-space: nowrap; }
.wdp-matrix th, .wdp-matrix td { padding: 0.5rem; }

.wdp-clickable-row {
  cursor: pointer;
  transition: background-color 0.1s ease;
}
.wdp-clickable-row:hover {
  background-color: var(--color-gray-light);
}
.wdp-row__details-drawer {
  padding: 1rem;
  background: var(--color-gray-light);
  border-top: 1px solid var(--color-gray-dark);
}
.wdp-group-time {
  background: var(--color-blue);
  color: white;
  padding: 0.5rem 1rem;
  margin: 1.5rem 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
}
.wdp-group-dest {
  margin: 0.75rem 0 0.25rem 0.5rem;
  color: var(--color-gray-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

/* ─── Summary Redesign ────────────────────────────────────────────────────── */

/* Day at a glance bar */
.wdp-glance {
  display: flex;
  flex-wrap: wrap;
  background: var(--wdp-primary);
  border-radius: var(--wdp-radius);
  margin: 0.5rem 0.5rem 0.75rem;
  overflow: hidden;
}
.wdp-glance__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.65rem 1.25rem;
  color: #fff;
  gap: 0.1rem;
}
.wdp-glance__num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.wdp-glance__label {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.wdp-glance__div {
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  align-self: stretch;
}

/* Time-slot block */
.wdp-sumblk {
  margin: 0 0.5rem 0.75rem;
  border-radius: var(--wdp-radius);
  border: 1px solid var(--wdp-border);
  overflow: hidden;
  background: var(--wdp-card);
  box-shadow: var(--wdp-shadow);
}
.wdp-sumblk__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.85rem;
  background: var(--wdp-primary);
  color: #fff;
}
.wdp-sumblk__time {
  font-size: 1rem;
  font-weight: 700;
}
.wdp-sumblk__slot-total {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 600;
}
.wdp-sumblk__runs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Individual run card within a time-slot block */
.wdp-run-sum {
  padding: 0.75rem 0.85rem;
  border-right: 1px solid var(--wdp-border);
  border-bottom: 1px solid var(--wdp-border);
}
.wdp-run-sum:last-child {
  border-right: none;
}
.wdp-run-sum__dest {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--wdp-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wdp-run-sum__boats {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
}
.wdp-run-sum__boat-ct {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--wdp-text);
}
.wdp-run-sum__boat-ct small {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wdp-neutral);
  margin-left: 1px;
}
.wdp-run-sum__row {
  display: flex;
  gap: 0.4rem;
  font-size: 0.78rem;
  margin-bottom: 0.18rem;
  line-height: 1.3;
}
.wdp-run-sum__key {
  font-weight: 700;
  color: var(--wdp-neutral);
  min-width: 4.2rem;
  flex-shrink: 0;
  align-self: flex-start;
}
.wdp-run-sum__van {
  line-height: 1.6;
}
.wdp-run-sum__row--warn {
  color: #9a3412;
}
.wdp-run-sum__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.55rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--wdp-border);
}

/* Day totals section */
.wdp-sum-totals {
  margin: 0 0.5rem 0.75rem;
  border-radius: var(--wdp-radius);
  border: 1px solid var(--wdp-border);
  overflow: hidden;
  background: var(--wdp-card);
  box-shadow: var(--wdp-shadow);
}
.wdp-sum-totals__hdr {
  padding: 0.4rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #eef3f9;
  color: var(--wdp-primary-dark);
  border-bottom: 1px solid var(--wdp-border);
}
.wdp-sum-totals__grid {
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.wdp-sum-totals__dest {
  font-size: 0.83rem;
}
.wdp-sum-totals__grand {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--wdp-primary-dark);
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--wdp-border);
}

/* Responsive: stack run cards on small screens */
@media (max-width: 600px) {
  .wdp-sumblk__runs {
    grid-template-columns: 1fr;
  }
  .wdp-run-sum {
    border-right: none;
  }
  .wdp-glance__stat {
    padding: 0.5rem 0.75rem;
  }
  .wdp-glance__num {
    font-size: 1.5rem;
  }
}

/* ── Summary pivot table ──────────────────────────────────────────────────── */
.wdp-st-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  border: 1px solid var(--wdp-border);
  border-radius: 6px;
}
.wdp-st {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
  min-width: 320px;
}
.wdp-st th,
.wdp-st td {
  border: 1px solid var(--wdp-border);
  padding: 0.28rem 0.55rem;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.wdp-st-item-hdr {
  background: var(--wdp-navy);
  color: #fff;
  font-weight: 700;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 3;
}
.wdp-st-time {
  background: var(--wdp-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom-color: rgba(255,255,255,0.2);
}
.wdp-st-total-hdr {
  background: var(--wdp-navy);
  color: #fff;
  font-weight: 700;
}
.wdp-st-dest {
  background: #dce4f0;
  color: var(--wdp-navy);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: 2.8rem;
  min-width: 2.8rem;
  max-width: 2.8rem;
}
.wdp-st-grp td {
  background: #f0f4fa;
  color: var(--wdp-navy);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: left;
  padding-left: 0.7rem;
}
.wdp-st-grp--warn td {
  background: #fff3cd;
  color: #92400e;
}
.wdp-st-lbl {
  text-align: left;
  font-weight: 500;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
  padding-left: 1.4rem !important;
  color: #333;
}
.wdp-st-n {
  font-weight: 700;
  color: var(--wdp-navy);
}
.wdp-st-z {
  color: #ccc;
  font-size: 0.72rem;
}
.wdp-st-dest--total {
  background: #c8d6ec;
}
.wdp-st-dest--grand {
  background: var(--wdp-navy);
  color: #fff;
  font-weight: 700;
}
.wdp-st-total-z {
  background: #f0f4fa;
}
.wdp-st-total-n {
  font-weight: 700;
  background: #f0f4fa;
  color: var(--wdp-navy);
}
/* Left border on first cell of Total section */
.wdp-st-sep {
  border-left: 2px solid var(--wdp-navy) !important;
}
.wdp-st-grand {
  background: #dce6f5 !important;
  font-weight: 800;
}


.wdp-st-trailer {
  font-size: 0.72rem;
  color: #555;
  white-space: normal;
  max-width: 7rem;
}
.wdp-st-warn {
  color: #92400e;
}

/* ── Per-booking accordion rows inside run cards (Departures tab) ───────── */
.wdp-run-booking {
  border: 1px solid var(--wdp-border);
  border-radius: 8px;
  background: #fbfcfe;
}

.wdp-run-booking__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  list-style: none;
}

.wdp-run-booking__summary::-webkit-details-marker { display: none; }
.wdp-run-booking[open] > .wdp-run-booking__summary::before { content: '▾ '; }
.wdp-run-booking:not([open]) > .wdp-run-booking__summary::before { content: '▸ '; }

.wdp-run-booking__name {
  font-weight: 700;
  font-size: 0.85rem;
  flex: 1 1 auto;
}

.wdp-run-booking__mix {
  font-size: 0.8rem;
  color: var(--wdp-neutral);
}

.wdp-run-booking__detail {
  display: grid;
  gap: 0.3rem 1rem;
  padding: 0.4rem 0.6rem 0.5rem;
  border-top: 1px solid var(--wdp-border);
  font-size: 0.82rem;
}

.wdp-btn--sm {
  min-height: 26px;
  padding: 0 0.6rem;
  font-size: 0.78rem;
}

/* ── Booking cards (Returns / In Progress tabs) ─────────────────────────── */
.wdp-booking-cards {
  display: grid;
  gap: 0.5rem;
}

.wdp-booking-card {
  margin: 0.35rem 0.5rem;
  padding: 0.5rem;
  background: var(--wdp-card);
  border: 1px solid var(--wdp-border);
  border-radius: var(--wdp-radius);
  box-shadow: var(--wdp-shadow);
}

.wdp-booking-card--checkedin {
  border-left: 4px solid var(--wdp-success);
  background: var(--wdp-success-light);
}

.wdp-booking-card--hold {
  border-left: 4px solid var(--wdp-accent);
  background: var(--wdp-accent-light);
}

.wdp-booking-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.wdp-booking-card__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.wdp-booking-card__meta {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--wdp-neutral);
}

.wdp-booking-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.wdp-booking-card__details {
  margin-top: 0.5rem;
  border-top: 1px solid var(--wdp-border);
  padding-top: 0.4rem;
}

.wdp-booking-card__details summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wdp-primary);
}

.wdp-booking-card__contact {
  display: grid;
  gap: 0.3rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.wdp-booking-card__contact a {
  color: var(--wdp-primary);
  text-decoration: none;
}

/* ── Login gate (shown to logged-out visitors) ──────────────────────────── */
.wdp-login-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem 1rem;
}

.wdp-login-gate__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  background: var(--wdp-card, #fff);
  border: 1px solid var(--wdp-border, #d1d5db);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 2.5rem 2rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.wdp-login-gate__logo {
  border-radius: 16px;
}

.wdp-login-gate__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wdp-navy, #1a3a5c);
}

.wdp-login-gate__msg {
  margin: 0;
  font-size: 0.9rem;
  color: var(--wdp-muted, #6b7280);
}

.wdp-login-gate__btn {
  display: inline-block;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.55rem 2rem;
  margin-top: 0.3rem;
}

