/*
 * Zemparant Partner Desk - design system
 * ======================================================================
 * One stylesheet for every page. It loads after Bootstrap 3 and AdminLTE
 * 2.4, so selectors are written to win on specificity (no blanket !important).
 *
 * TOKENS      :root custom properties: colour, type scale, control sizes.
 * TYPE        One sans-serif stack (--zp-font), regular 400 and bold 700 only.
 *             No italics, no light weights, no web fonts. Font Awesome 4 is the
 *             only icon font. Scale: page title 22, box title 16, body 14,
 *             table 13, small 12. Numbers in tables use tabular-nums.
 * BUTTONS     .btn-primary (brass) | .btn-default (white, navy outline) |
 *             .btn-danger | .btn-link. .btn-success maps to primary;
 *             .btn-warning and .btn-info map to default.
 *             Heights: .btn-xs 24, .btn-sm 30, .btn 34, .btn-lg 44 (44 minimum
 *             under 768px). States: [disabled] / .disabled and .is-loading
 *             (spinner replaces the label, keep the width). Icon gap is 6px:
 *             write <i class="fa fa-fw fa-plus"></i> Label.
 *             Placement: page actions top right in .content-header
 *             (.zp-page-actions); form actions bottom right in .box-footer;
 *             row actions right-aligned in the last cell (td.zp-col-actions).
 * FORMS       Labels sit above controls. Controls are 34px (30px .input-sm,
 *             44px .input-lg). Required marker: <span class="required-mark">*</span>.
 *             Validation: Bootstrap .has-error / .has-warning / .has-success.
 *             Select2 and bootstrap-datepicker match the native control.
 * TABLES      One header style, one row height, hover (no zebra). Money and
 *             number columns: class .zp-num (or .text-right). Action column:
 *             .zp-col-actions. Empty / loading: .zp-empty, .zp-empty.is-loading.
 * STATUS      .label.zp-st-<status>. One colour per status on every page:
 *               amber  pending requested reassigned maintenance
 *               blue   confirmed open (light), assigned on_trip (medium)
 *               navy   en_route_pickup at_pickup passenger_on_board en_route_dropoff
 *               green  completed (solid), approved available (light)
 *               gray   cancelled closed
 *               red    no_show suspended (light), rejected (solid)
 *               brass  invoiced
 * UTILITIES   .zp-actions  .zp-table-stack  .zp-scroll  .zp-kv  .zp-hide-xs
 *             .zp-show-xs-only  .zp-sticky-actions  (UTILITIES section below).
 * BREAKPOINTS 1200, 992 (auth split stacks), 768 (sidebar goes off-canvas,
 *             tables stack, actions stack), 576 (key/value and form grids
 *             collapse), 400 (compact). Verified at 1440, 1024, 768, 390, 360.
 * Z-INDEX     sticky actions 1020, header 1030, sidebar overlay 1035,
 *             sidebar 1040, modal 1050, pickers 1060, loading overlay 2000.
 */

:root {
  --zp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --zp-navy: #1c3348;
  --zp-navy-deep: #16324a;
  --zp-navy-night: #122838;
  --zp-brass: #b8956a;
  --zp-brass-light: #c6a67e;
  --zp-brass-dark: #a4845c;
  --zp-brass-tint: #f7f4ee;

  --zp-text: #2c333a;
  --zp-muted: #5c6974;
  --zp-faint: #7b8790;
  --zp-link: #1f5a8a;
  --zp-danger: #a33a3a;
  --zp-danger-dark: #8d2f2f;
  --zp-success: #2f6b4a;

  --zp-bg: #ecf0f5;
  --zp-surface: #fff;
  --zp-border: #d2d6de;
  --zp-border-soft: #e6eaee;
  --zp-control-border: #b8c3cd;
  --zp-radius: 2px;

  --zp-fs-title: 22px;
  --zp-fs-box: 16px;
  --zp-fs-body: 14px;
  --zp-fs-table: 13px;
  --zp-fs-small: 12px;

  --zp-h-xs: 24px;
  --zp-h-sm: 30px;
  --zp-h: 34px;
  --zp-h-lg: 44px;
  --zp-touch: 44px;
  --zp-gap: 16px;
}

/* ---- BASE AND TYPOGRAPHY ------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* One family everywhere. Specificity (0,2,2) beats AdminLTE, Bootstrap, Leaflet,
   toastr, Select2, DataTables and datepicker. Font Awesome icons are excluded;
   AdminLTE's @import of Source Sans Pro stays unused, so no font file loads. */
html,
html body,
html body *:not(.fa):not(.glyphicon) {
  font-family: var(--zp-font);
  font-style: normal;
}

html body {
  margin: 0;
  font-size: var(--zp-fs-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--zp-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--zp-navy);
}

h1, .h1 { font-size: var(--zp-fs-title); }
h2, .h2 { font-size: 18px; }
h3, .h3 { font-size: var(--zp-fs-box); }
h4, .h4 { font-size: var(--zp-fs-body); }
h5, .h5 { font-size: var(--zp-fs-table); }
h6, .h6 { font-size: var(--zp-fs-small); }

p {
  margin: 0 0 10px;
}

b, strong, th, dt, legend, label, .control-label {
  font-weight: 700;
}

small, .small {
  font-size: var(--zp-fs-small);
  font-weight: 400;
}

.lead {
  font-size: 16px;
  font-weight: 400;
}

a {
  color: var(--zp-link);
}

a:hover,
a:focus {
  color: #17466c;
  text-decoration: underline;
}

a:focus,
button:focus,
.btn:focus {
  outline: 0;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--zp-brass);
  outline-offset: 2px;
}

hr {
  border-top: 1px solid var(--zp-border-soft);
}

.text-muted {
  color: var(--zp-muted);
}

.text-danger {
  color: var(--zp-danger);
}

.zp-no-wrap {
  white-space: nowrap;
}

.zp-num,
.zp-money {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.zp-kicker {
  font-size: var(--zp-fs-small);
  font-weight: 700;
  color: var(--zp-brass-dark);
}

@keyframes zp-spin {
  to { transform: rotate(360deg); }
}

/* ---- SHELL: header, navbar, sidebar ------------------------------------- */

.skin-zemparant .wrapper {
  background: var(--zp-bg);
  overflow: visible;
}

.skin-zemparant .main-header {
  max-height: none;
  background-color: var(--zp-navy);
}

.skin-zemparant .main-header .navbar {
  min-height: 50px;
  margin-bottom: 0;
  border: 0;
  background-color: var(--zp-navy);
}

.skin-zemparant .main-header .logo {
  background-color: var(--zp-navy-deep);
  color: #f7f4ee;
  border-right: 1px solid var(--zp-navy-night);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.skin-zemparant .main-header .logo:hover,
.skin-zemparant .main-header .logo:focus {
  background-color: var(--zp-navy-night);
  color: #fff;
  text-decoration: none;
}

.skin-zemparant .main-header .logo b {
  font-weight: 700;
}

.skin-zemparant .main-header .navbar .navbar-nav > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 14px;
  line-height: 20px;
  color: #f4f1ea;
  background: transparent;
}

.skin-zemparant .main-header .navbar .navbar-nav > li > a:hover,
.skin-zemparant .main-header .navbar .navbar-nav > li > a:focus,
.skin-zemparant .main-header .navbar .navbar-nav > .open > a,
.skin-zemparant .main-header .navbar .navbar-nav > .open > a:hover,
.skin-zemparant .main-header .navbar .navbar-nav > .open > a:focus,
.skin-zemparant .main-header .navbar .sidebar-toggle:hover,
.skin-zemparant .main-header .navbar .sidebar-toggle:focus {
  background-color: var(--zp-navy-deep);
  color: #fff;
  text-decoration: none;
}

.skin-zemparant .main-header .navbar .sidebar-toggle {
  float: left;
  width: 50px;
  height: 50px;
  padding: 15px 0;
  line-height: 20px;
  text-align: center;
  color: #f4f1ea;
  background: transparent;
}

/* AdminLTE draws the hamburger with a FontAwesome ::before on the toggle itself.
   The toggle now uses the UI stack, so the pseudo-element names its icon font. */
.skin-zemparant .main-header .navbar .sidebar-toggle::before {
  content: "\f0c9";
  font-family: FontAwesome;
  font-size: 18px;
  font-weight: 400;
}

.skin-zemparant .main-header .navbar-custom-menu > .navbar-nav > li {
  position: relative;
}

.skin-zemparant .main-header .zp-user-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-zemparant .main-header .zp-bell > a {
  position: relative;
}

.skin-zemparant .main-header .zp-bell-count {
  position: absolute;
  top: 6px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--zp-brass);
  color: var(--zp-navy);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.skin-zemparant .main-header .navbar .dropdown-menu {
  right: 0;
  left: auto;
  min-width: 200px;
  margin-top: 0;
  padding: 4px 0;
  border: 1px solid var(--zp-border);
  border-radius: var(--zp-radius);
  background: #fff;
  box-shadow: 0 6px 16px rgba(18, 40, 56, 0.18);
}

.skin-zemparant .main-header .navbar .dropdown-menu > li > a {
  padding: 9px 16px;
  color: var(--zp-text);
  background: transparent;
  font-size: var(--zp-fs-body);
}

.skin-zemparant .main-header .navbar .dropdown-menu > li > a:hover,
.skin-zemparant .main-header .navbar .dropdown-menu > li > a:focus {
  background: #f4f6f8;
  color: var(--zp-navy);
  text-decoration: none;
}

.zp-menu-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--zp-border-soft);
  color: var(--zp-navy);
}

.zp-menu-head strong {
  display: block;
  overflow-wrap: anywhere;
}

.zp-menu-head small {
  display: block;
  color: var(--zp-muted);
}

.skin-zemparant .main-sidebar,
.skin-zemparant .left-side {
  background-color: var(--zp-navy);
}

.skin-zemparant .sidebar-menu > li.header {
  padding: 10px 16px;
  color: #9aabba;
  background: var(--zp-navy-deep);
  font-size: var(--zp-fs-small);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.skin-zemparant .sidebar-menu > li > a {
  padding: 11px 16px 11px 13px;
  color: #d7e0e8;
  border-left: 3px solid transparent;
  font-size: var(--zp-fs-body);
}

.skin-zemparant .sidebar-menu > li > a > .fa {
  width: 20px;
  margin-right: 10px;
  text-align: center;
  font-size: var(--zp-fs-body);
}

.skin-zemparant .sidebar-menu > li:hover > a,
.skin-zemparant .sidebar-menu > li.active > a {
  color: #fff;
  background: var(--zp-navy-deep);
  border-left-color: var(--zp-brass);
  text-decoration: none;
}

.skin-zemparant .sidebar-menu > li.active > a {
  font-weight: 700;
}

.skin-zemparant .sidebar a {
  color: #d7e0e8;
}

.zp-side-user {
  padding: 14px 16px;
  color: #d7e0e8;
  border-bottom: 1px solid var(--zp-navy-deep);
}

.zp-side-user strong {
  display: block;
  color: #fff;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.zp-side-user div {
  color: var(--zp-brass);
  font-size: var(--zp-fs-small);
}

@media (min-width: 768px) {
  .skin-zemparant.sidebar-collapse .zp-side-user,
  .skin-zemparant.sidebar-collapse .sidebar-menu > li.header {
    display: none;
  }
}

/* ---- CONTENT SHELL: wrapper, header, breadcrumb, footer ---------------- */

.content-wrapper,
.right-side,
.main-footer {
  background-color: var(--zp-bg);
  color: var(--zp-text);
}

.main-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--zp-border);
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
}

.content {
  min-height: 250px;
  margin: 0 auto;
  padding: var(--zp-gap);
}

/* Row 1: breadcrumb. Row 2: page title left, .zp-page-actions right. */
.content-header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--zp-gap);
  padding: var(--zp-gap) var(--zp-gap) 0;
}

.content-header::before,
.content-header::after {
  display: none;
}

.content-header > h1 {
  order: 0;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--zp-fs-title);
  font-weight: 700;
  line-height: 1.25;
  color: var(--zp-navy);
}

.content-header > h1 > small {
  display: inline-block;
  padding-left: 8px;
  color: var(--zp-muted);
  font-size: var(--zp-fs-body);
  font-weight: 400;
}

.content-header > .breadcrumb {
  order: -1;
  flex: 0 0 100%;
  position: static;
  float: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--zp-fs-small);
}

.content-header > .breadcrumb > li,
.content-header > .breadcrumb > li > a {
  color: var(--zp-muted);
}

.content-header > .breadcrumb > li > a:hover {
  color: var(--zp-navy);
}

.content-header > .breadcrumb > li.active {
  color: var(--zp-navy);
}

.content-header > .breadcrumb > li + li::before {
  content: "\203A";
  padding: 0 6px;
  color: #9aa6b1;
}

.content-header > .zp-page-actions {
  order: 1;
  flex: 0 0 auto;
  margin-left: auto;
}

/* ---- BOXES -------------------------------------------------------------- */

.box {
  margin-bottom: var(--zp-gap);
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-navy);
  border-radius: var(--zp-radius);
  background: var(--zp-surface);
  box-shadow: none;
}

.box.box-solid {
  border: 1px solid var(--zp-border);
}

.box.box-default { border-top-color: var(--zp-border); }
.box.box-danger { border-top-color: var(--zp-danger); }
.box.box-warning { border-top-color: var(--zp-brass); }
.box.box-success { border-top-color: var(--zp-success); }

.box-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 48px;
  padding: 10px var(--zp-gap);
  border-bottom: 1px solid var(--zp-border-soft);
  color: var(--zp-navy);
}

.box-header::before,
.box-header::after {
  display: none;
}

.box-header .box-title {
  display: block;
  float: none;
  margin: 0;
  font-size: var(--zp-fs-box);
  font-weight: 700;
  line-height: 1.3;
  color: var(--zp-navy);
}

.box-header .box-title .fa {
  margin-right: 6px;
  color: var(--zp-muted);
}

.box-header > .box-tools {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.box-header > .label:last-child {
  margin-left: auto;
}

.box-body {
  padding: var(--zp-gap);
  border-radius: 0;
}

.box-body > :last-child {
  margin-bottom: 0;
}

.box-body.table-responsive,
.box-body.no-padding {
  padding: 0;
}

/* Form actions: bottom right of the box footer. */
.box-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px var(--zp-gap);
  border-top: 1px solid var(--zp-border-soft);
  border-radius: 0;
  background: #f9fafb;
}

.box-footer > .pull-left {
  margin-right: auto;
}

/* ---- BUTTONS ------------------------------------------------------------ */

/* A bare .btn is the default (outline) button. Order matters below: default,
   primary, danger, link, sizes, disabled, loading. */
.btn {
  --zp-btn-fg: var(--zp-navy);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--zp-h);
  margin-bottom: 0;
  padding: 6px 14px;
  border: 1px solid var(--zp-navy);
  border-radius: var(--zp-radius);
  background-color: #fff;
  box-shadow: none;
  color: var(--zp-navy);
  font-size: var(--zp-fs-body);
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.btn > .fa {
  flex: 0 0 auto;
}

.btn:hover,
.btn:focus,
.btn.btn-default:hover,
.btn.btn-default:focus,
.btn.btn-default.focus,
.btn.btn-warning:hover,
.btn.btn-warning:focus,
.btn.btn-info:hover,
.btn.btn-info:focus {
  border-color: var(--zp-navy);
  background-color: #eef2f6;
  color: var(--zp-navy);
  text-decoration: none;
}

.btn:active,
.btn.active,
.btn.btn-default:active,
.btn.btn-default.active,
.btn.btn-default:active:hover,
.btn.btn-default:active:focus,
.btn.btn-default.active:hover,
.btn.btn-warning:active,
.btn.btn-info:active,
.open > .dropdown-toggle.btn.btn-default {
  border-color: var(--zp-navy);
  background-color: #e1e8ef;
  color: var(--zp-navy);
  box-shadow: none;
}

.btn.btn-default,
.btn.btn-warning,
.btn.btn-info {
  border-color: var(--zp-navy);
  background-color: #fff;
  color: var(--zp-navy);
}

/* Primary (brass, navy text). .btn-success is the same button. */
.btn.btn-primary,
.btn.btn-success {
  --zp-btn-fg: var(--zp-navy);
  border-color: var(--zp-brass-dark);
  background-color: var(--zp-brass);
  color: var(--zp-navy);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary.focus,
.btn.btn-success:hover,
.btn.btn-success:focus {
  border-color: var(--zp-brass);
  background-color: var(--zp-brass-light);
  color: var(--zp-navy);
}

.btn.btn-primary:active,
.btn.btn-primary.active,
.btn.btn-primary:active:hover,
.btn.btn-primary:active:focus,
.btn.btn-primary.active:hover,
.btn.btn-success:active,
.btn.btn-success.active,
.open > .dropdown-toggle.btn.btn-primary {
  border-color: var(--zp-brass-dark);
  background-color: #a98a5f;
  color: var(--zp-navy);
}

.btn.btn-primary:focus-visible,
.btn.btn-success:focus-visible {
  outline-color: var(--zp-navy);
}

/* Danger */
.btn.btn-danger {
  --zp-btn-fg: #fff;
  border-color: var(--zp-danger-dark);
  background-color: var(--zp-danger);
  color: #fff;
}

.btn.btn-danger:hover,
.btn.btn-danger:focus,
.btn.btn-danger.focus {
  border-color: var(--zp-danger-dark);
  background-color: #b44646;
  color: #fff;
}

.btn.btn-danger:active,
.btn.btn-danger.active,
.btn.btn-danger:active:hover,
.btn.btn-danger:active:focus,
.btn.btn-danger.active:hover,
.open > .dropdown-toggle.btn.btn-danger {
  border-color: var(--zp-danger-dark);
  background-color: var(--zp-danger-dark);
  color: #fff;
}

/* Link */
.btn.btn-link {
  --zp-btn-fg: var(--zp-link);
  padding-right: 8px;
  padding-left: 8px;
  border-color: transparent;
  background-color: transparent;
  color: var(--zp-link);
}

.btn.btn-link:hover,
.btn.btn-link:focus,
.btn.btn-link:active {
  border-color: transparent;
  background-color: transparent;
  color: #17466c;
  text-decoration: underline;
}

/* Sizes: 24 / 30 / 34 / 44 */
.btn.btn-xs {
  min-height: var(--zp-h-xs);
  gap: 4px;
  padding: 2px 8px;
  font-size: var(--zp-fs-small);
  line-height: 18px;
}

.btn.btn-sm {
  min-height: var(--zp-h-sm);
  padding: 4px 12px;
  font-size: var(--zp-fs-table);
  line-height: 20px;
}

.btn.btn-lg {
  min-height: var(--zp-h-lg);
  padding: 10px 20px;
  border-radius: var(--zp-radius);
  font-size: 16px;
  line-height: 22px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-block + .btn-block {
  margin-top: 8px;
}

.btn-group > .btn + .btn {
  margin-left: -1px;
}

/* Disabled */
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

a.btn.disabled {
  pointer-events: none;
}

.btn.btn-primary.disabled,
.btn.btn-primary[disabled],
.btn.btn-primary[disabled]:hover,
.btn.btn-primary[disabled]:focus,
.btn.btn-primary.disabled:hover,
.btn.btn-success.disabled,
.btn.btn-success[disabled],
.btn.btn-success[disabled]:hover,
fieldset[disabled] .btn.btn-primary,
fieldset[disabled] .btn.btn-primary:hover {
  border-color: var(--zp-brass-dark) !important;
  background-color: var(--zp-brass) !important;
  color: var(--zp-navy) !important;
}

.btn.btn-danger.disabled,
.btn.btn-danger[disabled],
.btn.btn-danger[disabled]:hover,
.btn.btn-danger[disabled]:focus,
fieldset[disabled] .btn.btn-danger,
fieldset[disabled] .btn.btn-danger:hover {
  border-color: var(--zp-danger-dark) !important;
  background-color: var(--zp-danger) !important;
  color: #fff !important;
}

.btn.btn-default.disabled,
.btn.btn-default[disabled],
.btn.btn-default[disabled]:hover,
.btn.btn-default[disabled]:focus,
fieldset[disabled] .btn.btn-default,
fieldset[disabled] .btn.btn-default:hover {
  border-color: var(--zp-navy) !important;
  background-color: #fff !important;
  color: var(--zp-navy) !important;
}

/* Loading: keeps the button width, shows a spinner instead of the label */
.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading > * {
  visibility: hidden;
}

.btn.is-loading[disabled] {
  opacity: 1;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--zp-btn-fg);
  border-right-color: transparent;
  border-radius: 50%;
  animation: zp-spin 0.7s linear infinite;
}

.btn.btn-xs.is-loading::after {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
}

/* ---- FORMS -------------------------------------------------------------- */

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid var(--zp-border-soft);
  color: var(--zp-navy);
  font-size: var(--zp-fs-body);
  line-height: inherit;
}

label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 4px;
  color: #3e4a54;
  font-size: var(--zp-fs-table);
}

.form-group {
  margin-bottom: 14px;
}

.form-control {
  display: block;
  width: 100%;
  height: var(--zp-h);
  padding: 6px 12px;
  border: 1px solid var(--zp-control-border);
  border-radius: var(--zp-radius);
  background-color: #fff;
  box-shadow: none;
  color: var(--zp-text);
  font-size: var(--zp-fs-body);
  line-height: 20px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.form-control:focus {
  border-color: var(--zp-brass);
  box-shadow: 0 0 0 2px rgba(184, 149, 106, 0.3);
  outline: 0;
}

.form-control::placeholder {
  color: var(--zp-faint);
  opacity: 1;
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: #f4f6f8;
  color: var(--zp-muted);
  cursor: not-allowed;
  opacity: 1;
}

textarea.form-control {
  height: auto;
  min-height: var(--zp-h);
  resize: vertical;
}

.input-sm,
select.input-sm {
  height: var(--zp-h-sm);
  padding: 4px 10px;
  border-radius: var(--zp-radius);
  font-size: var(--zp-fs-table);
  line-height: 20px;
}

textarea.input-sm {
  height: auto;
  min-height: var(--zp-h-sm);
}

.input-lg,
select.input-lg {
  height: var(--zp-h-lg);
  padding: 10px 14px;
  border-radius: var(--zp-radius);
  font-size: 16px;
  line-height: 22px;
}

textarea.input-lg {
  height: auto;
}

.help-block {
  display: block;
  margin: 4px 0 0;
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
}

.required-mark {
  margin-left: 2px;
  color: var(--zp-danger);
  font-weight: 700;
}

.has-error .form-control,
.form-control.is-invalid,
.form-control[aria-invalid="true"] {
  border-color: var(--zp-danger);
  box-shadow: none;
}

.has-error .form-control:focus,
.form-control.is-invalid:focus {
  border-color: var(--zp-danger);
  box-shadow: 0 0 0 2px rgba(163, 58, 58, 0.25);
}

.has-error .control-label,
.has-error .help-block,
.has-error label,
.has-error .checkbox label {
  color: var(--zp-danger);
}

.has-warning .form-control {
  border-color: var(--zp-brass-dark);
  box-shadow: none;
}

.has-warning .control-label,
.has-warning .help-block,
.has-warning label {
  color: #7a5a1c;
}

.has-success .form-control {
  border-color: var(--zp-success);
  box-shadow: none;
}

.has-success .control-label,
.has-success .help-block,
.has-success label {
  color: var(--zp-success);
}

.input-group-addon {
  padding: 6px 12px;
  border: 1px solid var(--zp-control-border);
  border-radius: var(--zp-radius);
  background-color: #f4f6f8;
  color: var(--zp-muted);
  font-size: var(--zp-fs-body);
  line-height: 20px;
}

.input-group .form-control:focus {
  z-index: 3;
}

.input-group-btn > .btn {
  min-height: var(--zp-h);
}

.checkbox,
.radio {
  margin: 0 0 8px;
}

.checkbox label,
.radio label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 20px;
  margin-bottom: 0;
  padding-left: 0;
  color: var(--zp-text);
  font-size: var(--zp-fs-body);
  font-weight: 400;
  cursor: pointer;
}

.checkbox input[type="checkbox"],
.radio input[type="radio"] {
  position: static;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--zp-navy);
}

/* Grouped form sections (register, settings, long forms) */
.zp-form-section {
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--zp-border-soft);
  color: var(--zp-navy);
  font-size: var(--zp-fs-body);
  font-weight: 700;
}

.zp-form-section:first-child {
  margin-top: 0;
}

.zp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--zp-gap);
}

.zp-form-grid > .zp-span-2 {
  grid-column: 1 / -1;
}

/* Inline filter bars: one row from 768px, controls share one gap */
@media (min-width: 768px) {
  .form-inline:not(.dataTables_wrapper) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
  }

  .form-inline:not(.dataTables_wrapper) > .form-group {
    margin: 0 !important;
  }

  .form-inline:not(.dataTables_wrapper) > label {
    align-self: center;
    margin: 0;
  }
}

/* Select2 matches the native control */
.select2-container {
  max-width: 100%;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: var(--zp-h);
  border: 1px solid var(--zp-control-border);
  border-radius: var(--zp-radius);
  background: #fff;
}

.select2-container--default .select2-selection--single {
  height: var(--zp-h);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-right: 28px;
  padding-left: 12px;
  color: var(--zp-text);
  font-size: var(--zp-fs-body);
  line-height: 32px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  right: 4px;
  height: 32px;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  padding: 0 6px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin-top: 4px;
  padding: 1px 8px;
  border: 1px solid #bccbdb;
  border-radius: var(--zp-radius);
  background: #e4edf6;
  color: var(--zp-navy);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: var(--zp-brass);
}

.select2-dropdown {
  z-index: 1060;
  border: 1px solid var(--zp-control-border);
  border-radius: var(--zp-radius);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  height: var(--zp-h);
  padding: 6px 10px;
  border: 1px solid var(--zp-control-border);
  border-radius: var(--zp-radius);
  font-size: var(--zp-fs-body);
}

.select2-container--default .select2-results__option {
  padding: 8px 12px;
  font-size: var(--zp-fs-body);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--zp-navy);
  color: #fff;
}

/* bootstrap-datepicker matches the native control */
.datepicker {
  z-index: 1060 !important;
  padding: 6px;
  border: 1px solid var(--zp-control-border);
  border-radius: var(--zp-radius);
  box-shadow: 0 6px 16px rgba(18, 40, 56, 0.18);
  font-size: var(--zp-fs-table);
}

.datepicker table tr td,
.datepicker table tr th {
  width: 34px;
  height: 34px;
  border-radius: var(--zp-radius);
  text-align: center;
}

.datepicker table tr td.day:hover,
.datepicker table tr td span:hover,
.datepicker .datepicker-switch:hover,
.datepicker .prev:hover,
.datepicker .next:hover {
  background: #eef2f6;
  color: var(--zp-navy);
}

.datepicker table tr td.today {
  background: #f3ece1;
  color: var(--zp-navy);
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.active,
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover {
  border-color: var(--zp-navy);
  background-color: var(--zp-navy);
  background-image: none;
  color: #fff;
  text-shadow: none;
}

.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
  background: transparent;
  color: #b0bac3;
}

.datepicker .datepicker-switch,
.datepicker .prev,
.datepicker .next {
  font-weight: 700;
  color: var(--zp-navy);
}

/* ---- TABLES ------------------------------------------------------------- */

.content-wrapper .table,
.modal .table {
  width: 100%;
  max-width: 100%;
  margin-bottom: var(--zp-gap);
  font-size: var(--zp-fs-table);
  font-variant-numeric: tabular-nums;
}

.content-wrapper .table > thead > tr > th,
.modal .table > thead > tr > th {
  padding: 9px 10px;
  border-top: 0;
  border-bottom: 1px solid var(--zp-border);
  background: #f7f8fa;
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  vertical-align: bottom;
  white-space: nowrap;
}

.content-wrapper .table > tbody > tr > td,
.content-wrapper .table > tbody > tr > th,
.content-wrapper .table > tfoot > tr > td,
.content-wrapper .table > tfoot > tr > th,
.modal .table > tbody > tr > td,
.modal .table > tbody > tr > th {
  padding: 8px 10px;
  border-top: 1px solid #edf0f3;
  color: var(--zp-text);
  font-size: var(--zp-fs-table);
  line-height: 20px;
  vertical-align: middle;
}

.content-wrapper .table > tbody > tr:first-child > td,
.content-wrapper .table > tbody > tr:first-child > th {
  border-top: 0;
}

.content-wrapper .table > tfoot > tr > td,
.content-wrapper .table > tfoot > tr > th {
  border-top: 1px solid var(--zp-border);
  background: #f7f8fa;
  font-weight: 700;
}

/* Hover, no zebra */
.content-wrapper .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: transparent;
}

.content-wrapper .table > tbody > tr:hover {
  background-color: #f5f8fb;
}

.content-wrapper .table-bordered {
  border: 1px solid var(--zp-border);
}

.content-wrapper .table-bordered > thead > tr > th,
.content-wrapper .table-bordered > tbody > tr > td,
.content-wrapper .table-bordered > tbody > tr > th,
.content-wrapper .table-bordered > tfoot > tr > td,
.content-wrapper .table-bordered > tfoot > tr > th {
  border: 1px solid var(--zp-border-soft);
}

.content-wrapper .table-bordered > thead > tr > th {
  border-bottom-color: var(--zp-border);
}

/* Number and money columns right-aligned; action column shrinks to its buttons */
.content-wrapper .table th.text-right,
.content-wrapper .table td.text-right,
.content-wrapper .table th.zp-num,
.content-wrapper .table td.zp-num,
.content-wrapper .table th.zp-money,
.content-wrapper .table td.zp-money {
  text-align: right;
  white-space: nowrap;
}

.content-wrapper .table th.zp-col-actions,
.content-wrapper .table td.zp-col-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.zp-col-actions .btn + .btn,
.zp-col-actions .btn + a,
.zp-col-actions a + .btn {
  margin-left: 6px;
}

.table-responsive {
  position: relative;
  min-height: 0.01%;
  margin-bottom: 0;
  border: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  margin-bottom: 0;
}

.box-body > .table:last-child {
  margin-bottom: 0;
}

/* Tables flush inside a box keep the box's 16px inset on the outer cells */
.box-body.table-responsive > .table > thead > tr > th:first-child,
.box-body.table-responsive > .table > tbody > tr > td:first-child,
.box-body.table-responsive > .table > tfoot > tr > td:first-child {
  padding-left: var(--zp-gap);
}

.box-body.table-responsive > .table > thead > tr > th:last-child,
.box-body.table-responsive > .table > tbody > tr > td:last-child,
.box-body.table-responsive > .table > tfoot > tr > td:last-child {
  padding-right: var(--zp-gap);
}

/* DataTables 1.10 (Bootstrap 3 integration) */
div.dataTables_wrapper > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

div.dataTables_wrapper > .row::before,
div.dataTables_wrapper > .row::after {
  display: none;
}

div.dataTables_wrapper > .row > [class*="col-"] {
  float: none;
  width: auto;
  min-height: 0;
  padding: 0;
}

div.dataTables_wrapper > .row > .col-sm-12 {
  flex: 1 1 100%;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
  margin: 0;
  padding: 10px var(--zp-gap);
  color: var(--zp-muted);
  font-size: var(--zp-fs-table);
  white-space: normal;
}

div.dataTables_wrapper div.dataTables_info {
  padding-top: 10px;
  font-size: var(--zp-fs-small);
}

div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--zp-muted);
  font-weight: 400;
  white-space: nowrap;
}

div.dataTables_wrapper div.dataTables_length select {
  width: auto;
  height: var(--zp-h-sm);
  padding: 4px 8px;
  font-size: var(--zp-fs-table);
}

div.dataTables_wrapper div.dataTables_filter input {
  width: 240px;
  height: var(--zp-h-sm);
  margin: 0;
  padding: 4px 10px;
  font-size: var(--zp-fs-table);
}

div.dataTables_wrapper div.dataTables_paginate {
  text-align: right;
}

div.dataTables_wrapper div.dataTables_paginate .pagination {
  margin: 0;
}

div.dataTables_wrapper div.dataTables_processing {
  padding: 12px 20px;
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-brass);
  background: #fff;
  color: var(--zp-navy);
}

table.dataTable {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

table.dataTable.no-footer {
  border-bottom: 1px solid var(--zp-border);
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
  padding-right: 26px;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after,
table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::after {
  top: 50%;
  right: 9px;
  bottom: auto;
  margin-top: -7px;
  font-family: FontAwesome;
  font-size: var(--zp-fs-small);
  font-weight: 400;
  line-height: 14px;
  opacity: 0.35;
}

table.dataTable thead .sorting::after {
  content: "\f0dc";
}

table.dataTable thead .sorting_asc::after {
  content: "\f0de";
  opacity: 0.9;
}

table.dataTable thead .sorting_desc::after {
  content: "\f0dd";
  opacity: 0.9;
}

table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::after {
  content: "";
}

/* Empty and loading states (also used for table rows) */
.zp-empty,
table.dataTable td.dataTables_empty {
  padding: 32px var(--zp-gap);
  color: var(--zp-muted);
  font-size: var(--zp-fs-body);
  text-align: center;
}

.zp-empty .fa {
  display: block;
  margin-bottom: 8px;
  color: #9aa6b1;
  font-size: 24px;
}

.zp-empty strong {
  display: block;
  color: var(--zp-navy);
}

.zp-empty.is-loading::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto 10px;
  border: 2px solid var(--zp-border);
  border-top-color: var(--zp-navy);
  border-radius: 50%;
  animation: zp-spin 0.8s linear infinite;
}

/* ---- LABELS AND STATUS -------------------------------------------------- */

/* One label size. Any element carrying a .zp-st-<status> class is a label. */
.label,
[class*="zp-st-"] {
  display: inline-block;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: var(--zp-radius);
  background: #eceff2;
  color: #4a5560;
  font-size: var(--zp-fs-small);
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

/* Legacy Bootstrap label colours follow the same palette (AdminLTE forces
   its own with !important, so these must too). */
.label.label-default { border-color: #cdd4da; background-color: #eceff2 !important; color: #4a5560; }
.label.label-primary { border-color: var(--zp-navy); background-color: var(--zp-navy) !important; color: #fff; }
.label.label-success { border-color: #b4d6c0; background-color: #e3f1e8 !important; color: #1f5237; }
.label.label-info { border-color: #b9cde1; background-color: #e4edf6 !important; color: #17446f; }
.label.label-warning { border-color: #e6cd8f; background-color: #fff4dc !important; color: #6b4a00; }
.label.label-danger { border-color: #e4b9b9; background-color: #fbeaea !important; color: #7a2b2b; }

/* Status mapping (see the header comment for the colour families) */
.zp-st-pending,
.zp-st-requested,
.zp-st-reassigned,
.zp-st-maintenance {
  border-color: #e6cd8f;
  background-color: #fff4dc;
  color: #6b4a00;
}

.zp-st-confirmed,
.zp-st-open {
  border-color: #b9cde1;
  background-color: #e4edf6;
  color: #17446f;
}

.zp-st-assigned,
.zp-st-on_trip {
  border-color: #9dbbd8;
  background-color: #cddff1;
  color: #10385f;
}

.zp-st-en_route_pickup,
.zp-st-at_pickup,
.zp-st-passenger_on_board,
.zp-st-en_route_dropoff {
  border-color: var(--zp-navy);
  background-color: var(--zp-navy);
  color: #fff;
}

.zp-st-completed {
  border-color: var(--zp-success);
  background-color: var(--zp-success);
  color: #fff;
}

.zp-st-approved,
.zp-st-available {
  border-color: #b4d6c0;
  background-color: #e3f1e8;
  color: #1f5237;
}

.zp-st-cancelled,
.zp-st-closed {
  border-color: #cdd4da;
  background-color: #eceff2;
  color: #4a5560;
}

.zp-st-no_show,
.zp-st-suspended {
  border-color: #e4b9b9;
  background-color: #fbeaea;
  color: #7a2b2b;
}

.zp-st-rejected {
  border-color: var(--zp-danger);
  background-color: var(--zp-danger);
  color: #fff;
}

.zp-st-invoiced {
  border-color: #d9c3a0;
  background-color: #f3ece1;
  color: #5f4524;
}

.zp-mark {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  color: #b8956a;
}

.logo .zp-mark {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

.logo-mini .zp-mark {
  margin: 0;
}

/* ---- GRID GUTTERS: 16px, same as the vertical rhythm -------------------- */

.row {
  margin-right: -8px;
  margin-left: -8px;
}

[class*="col-xs-"],
[class*="col-sm-"],
[class*="col-md-"],
[class*="col-lg-"] {
  padding-right: 8px;
  padding-left: 8px;
}

/* ---- KPI TILES ---------------------------------------------------------- */

.zp-kpis {
  display: flex;
  flex-wrap: wrap;
}

.zp-kpis::before,
.zp-kpis::after {
  display: none;
}

.zp-kpis > [class*="col-"] {
  display: flex;
}

/* The tile owns the vertical gap; doubled class beats page-level column margins */
.zp-kpis.zp-kpis > [class*="col-"] {
  margin-bottom: 0;
}

.zp-kpi {
  flex: 1 1 auto;
  width: 100%;
  min-height: 88px;
  margin-bottom: var(--zp-gap);
  padding: 12px var(--zp-gap);
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-brass);
  border-radius: var(--zp-radius);
  background: #fff;
}

.zp-kpi .zp-kpi-label {
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
  font-weight: 700;
}

.zp-kpi .zp-kpi-value {
  margin-top: 4px;
  color: var(--zp-navy);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.zp-kpi .zp-kpi-note {
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
}

/* ---- WIZARD STEPS ------------------------------------------------------- */

.zp-wizard {
  display: flex;
  margin: 0 0 var(--zp-gap);
  padding: 0;
  list-style: none;
  border: 1px solid var(--zp-border);
  border-radius: var(--zp-radius);
  background: #fff;
  counter-reset: zp-step;
}

.zp-wizard li {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 14px;
  border-right: 1px solid var(--zp-border-soft);
  color: var(--zp-muted);
  font-size: var(--zp-fs-table);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  counter-increment: zp-step;
}

.zp-wizard li:last-child {
  border-right: 0;
}

.zp-wizard li.active {
  color: var(--zp-navy);
  box-shadow: inset 0 -2px 0 var(--zp-brass);
}

.zp-wizard li.done {
  color: var(--zp-success);
}

/* ---- TIMELINE AND DEFINITION LISTS -------------------------------------- */

.zp-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.zp-timeline li {
  position: relative;
  margin-left: 6px;
  padding: 0 0 14px 18px;
  border-left: 2px solid var(--zp-border);
}

.zp-timeline li:last-child {
  padding-bottom: 0;
}

.zp-timeline li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--zp-brass);
  border-radius: 50%;
  background: #fff;
}

.zp-timeline li:last-child::before {
  border-color: var(--zp-navy);
  background: var(--zp-navy);
}

dl {
  margin-top: 0;
  margin-bottom: var(--zp-gap);
}

dt {
  color: var(--zp-muted);
  font-size: var(--zp-fs-table);
}

dd {
  margin-left: 0;
}

.dl-horizontal {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: 8px var(--zp-gap);
  margin: 0;
}

.dl-horizontal dt,
.dl-horizontal dd {
  float: none;
  clear: none;
  width: auto;
  margin: 0;
  overflow: visible;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dl-horizontal dd::before,
.dl-horizontal dd::after {
  display: none;
}

/* ---- ALERTS, TOASTS, MENUS, PAGINATION, MODALS, TABS ------------------- */

/* AdminLTE forces solid alert colours with !important, so tinted ones must too. */
.alert {
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-left-width: 3px;
  border-radius: var(--zp-radius);
  font-size: var(--zp-fs-body);
}

.alert > .fa {
  margin-right: 6px;
}

.alert h4 {
  margin-top: 0;
  color: inherit;
}

.alert a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.alert-danger,
.alert-error {
  border-color: #e4b9b9 !important;
  border-left-color: var(--zp-danger) !important;
  background-color: #fbeaea !important;
  color: #7a2b2b !important;
}

.alert-warning {
  border-color: #e6cd8f !important;
  border-left-color: var(--zp-brass) !important;
  background-color: #fff4dc !important;
  color: #6b4a00 !important;
}

.alert-info {
  border-color: #b9cde1 !important;
  border-left-color: var(--zp-navy) !important;
  background-color: #e4edf6 !important;
  color: #17446f !important;
}

.alert-success {
  border-color: #b4d6c0 !important;
  border-left-color: var(--zp-success) !important;
  background-color: #e3f1e8 !important;
  color: #1f5237 !important;
}

/* toastr: flat cards, one palette */
#toast-container > div {
  width: auto;
  max-width: 360px;
  padding: 12px 14px 12px 50px;
  border-radius: var(--zp-radius);
  box-shadow: 0 4px 12px rgba(18, 40, 56, 0.25);
  opacity: 1;
}

#toast-container > div:hover {
  box-shadow: 0 4px 12px rgba(18, 40, 56, 0.35);
  opacity: 1;
}

#toast-container > .toast-success { background-color: var(--zp-success); }
#toast-container > .toast-error { background-color: var(--zp-danger-dark); }
#toast-container > .toast-info { background-color: var(--zp-navy); }
#toast-container > .toast-warning { background-color: #7d5d2c; }

#toast-container .toast-title {
  font-weight: 700;
}

#toast-container .toast-message {
  overflow-wrap: anywhere;
}

.dropdown-menu {
  min-width: 160px;
  padding: 4px 0;
  border: 1px solid var(--zp-border);
  border-radius: var(--zp-radius);
  box-shadow: 0 6px 16px rgba(18, 40, 56, 0.15);
  font-size: var(--zp-fs-body);
}

.dropdown-menu > li > a {
  padding: 8px 16px;
  color: var(--zp-text);
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background: #f4f6f8;
  color: var(--zp-navy);
  text-decoration: none;
}

.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  background: var(--zp-navy);
  color: #fff;
}

.dropdown-menu .divider {
  margin: 4px 0;
  background-color: var(--zp-border-soft);
}

.pagination {
  margin: 0;
  border-radius: var(--zp-radius);
}

.pagination > li > a,
.pagination > li > span {
  padding: 6px 12px;
  border: 1px solid var(--zp-border);
  background: #fff;
  color: var(--zp-navy);
  font-size: var(--zp-fs-table);
  line-height: 20px;
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
  border-top-left-radius: var(--zp-radius);
  border-bottom-left-radius: var(--zp-radius);
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
  border-top-right-radius: var(--zp-radius);
  border-bottom-right-radius: var(--zp-radius);
}

.pagination > li > a:hover,
.pagination > li > a:focus {
  border-color: var(--zp-border);
  background: #eef2f6;
  color: var(--zp-navy);
}

.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > a:focus,
.pagination > .active > span {
  border-color: var(--zp-navy);
  background: var(--zp-navy);
  color: #fff;
}

.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > span {
  border-color: var(--zp-border);
  background: #fff;
  color: #9aa6b1;
}

.modal-content {
  border: 1px solid var(--zp-border);
  border-radius: var(--zp-radius);
  box-shadow: 0 12px 32px rgba(18, 40, 56, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--zp-gap);
  border-bottom: 1px solid var(--zp-border-soft);
}

.modal-header::before,
.modal-header::after {
  display: none;
}

.modal-header .close {
  order: 2;
  float: none;
  margin: 0 0 0 auto;
}

.modal-title {
  margin: 0;
  color: var(--zp-navy);
  font-size: var(--zp-fs-box);
  font-weight: 700;
  line-height: 1.3;
}

.modal-body {
  padding: var(--zp-gap);
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px var(--zp-gap);
  border-top: 1px solid var(--zp-border-soft);
  background: #f9fafb;
}

.modal-footer::before,
.modal-footer::after {
  display: none;
}

.modal-footer .btn + .btn {
  margin: 0;
}

.modal-backdrop.in {
  background: var(--zp-navy-night);
  opacity: 0.55;
}

.nav-tabs {
  border-bottom: 1px solid var(--zp-border);
}

.nav-tabs > li > a {
  margin-right: 2px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--zp-radius) var(--zp-radius) 0 0;
  color: var(--zp-muted);
  font-size: var(--zp-fs-table);
  font-weight: 700;
}

.nav-tabs > li > a:hover {
  border-color: var(--zp-border-soft) var(--zp-border-soft) var(--zp-border);
  background: #f4f6f8;
  color: var(--zp-navy);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  border-color: var(--zp-border) var(--zp-border) #fff;
  border-top-color: var(--zp-brass);
  background: #fff;
  color: var(--zp-navy);
}

.close {
  color: var(--zp-navy);
  font-weight: 700;
  opacity: 0.6;
  text-shadow: none;
}

.close:hover,
.close:focus {
  color: var(--zp-navy);
  opacity: 1;
}

.zp-suggest {
  position: relative;
}

.zp-suggest-menu {
  display: none;
  position: absolute;
  z-index: 20;
  width: 100%;
  max-height: 240px;
  overflow: auto;
  border-radius: 2px;
}

.zp-suggest-menu.open {
  display: block;
}

.zp-suggest-menu > li > a {
  white-space: normal;
  font-size: 13px;
  padding: 7px 12px;
}

.zp-route-strip {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--zp-gap);
  border: 1px solid var(--zp-border);
  border-radius: var(--zp-radius);
  background: #fff;
}

.zp-route-strip div {
  flex: 1 1 140px;
  min-width: 0;
  padding: 10px 14px;
  border-right: 1px solid var(--zp-border-soft);
}

.zp-route-strip div:last-child {
  border-right: 0;
}

.zp-route-strip span {
  display: block;
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
}

.zp-route-strip strong {
  color: var(--zp-navy);
  font-size: var(--zp-fs-body);
  font-weight: 700;
  overflow-wrap: anywhere;
}

#dispatch-map {
  height: 460px;
  background: #d9e0e6;
  border: 1px solid var(--zp-border);
}

.zp-vehicle {
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid var(--zp-border);
  border-left: 3px solid var(--zp-navy);
  border-radius: var(--zp-radius);
  background: #fff;
}

.zp-vehicle.is-selected {
  border-color: var(--zp-brass);
  border-left-color: var(--zp-brass);
  background: #fbf8f3;
}

.zp-vehicle.is-disabled {
  background: #f4f6f8;
  border-left-color: #b7c0c8;
}

.zp-vehicle-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.zp-vehicle-name {
  color: var(--zp-navy);
  font-weight: 700;
}

.zp-vehicle-price {
  color: var(--zp-navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.zp-vehicle p {
  margin: 4px 0;
  color: var(--zp-muted);
  font-size: var(--zp-fs-small);
}

.zp-breakdown {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--zp-border-soft);
  border-radius: var(--zp-radius);
  background: #f7f8fa;
  color: #3e4a54;
  font-size: var(--zp-fs-small);
  font-variant-numeric: tabular-nums;
}

.zp-map-box {
  position: relative;
}

/* ---- LOADING OVERLAY ---------------------------------------------------- */

.zp-inline-loading {
  color: var(--zp-navy);
  text-align: center;
}

.zp-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 240, 245, 0.72);
  color: var(--zp-navy);
  text-align: center;
}

.zp-overlay[hidden] {
  display: none !important;
}

.zp-overlay .zp-overlay-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  padding: 14px 22px;
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-brass);
  background: #fff;
  font-weight: 700;
}

/* ---- AUTH SPLIT (sign in, register, pending) ---------------------------- */

.zp-login-body {
  margin: 0;
  background: #f7f6f3;
}

.zp-split {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.zp-split-brand {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 64px;
  overflow: hidden;
  background: var(--zp-navy);
  color: #f4f1ea;
}

.zp-split-brand h1 {
  margin: 8px 0;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.zp-split-brand .zp-kicker {
  margin-top: 20px;
  color: var(--zp-brass);
  font-size: var(--zp-fs-table);
  font-weight: 700;
}

.zp-split-brand p.lead-quiet {
  max-width: 460px;
  margin: 0;
  color: #d5dde6;
  font-size: 16px;
  line-height: 1.5;
}

.zp-route-diagram {
  width: min(420px, 100%);
  height: auto;
  margin-top: 48px;
}

.zp-auth-mark {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--zp-brass);
}

.zp-split-form {
  flex: 0 0 480px;
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
  border-left: 1px solid #d9d3c8;
  background: #f7f6f3;
}

.zp-split-form--wide {
  flex-basis: 680px;
  width: 680px;
}

.zp-auth-card {
  width: 100%;
  max-width: 384px;
  margin: 0 auto;
}

.zp-split-form--wide .zp-auth-card {
  max-width: 584px;
}

.zp-split-form h2 {
  margin: 0 0 8px;
  color: var(--zp-navy);
  font-size: var(--zp-fs-title);
  font-weight: 700;
}

.zp-split-form .help-links {
  margin: 16px 0 0;
  font-size: var(--zp-fs-table);
  text-align: center;
}

.zp-auth-card > #pending-state:not(.zp-empty) {
  margin-bottom: var(--zp-gap);
  padding: 20px;
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-brass);
  border-radius: var(--zp-radius);
  background: #fff;
  text-align: left;
}

.zp-auth-card > #pending-state p:last-child {
  margin-bottom: 0;
}

.zp-auth-card .zp-form-grid > .help-block {
  margin: -4px 0 var(--zp-gap);
}

.zp-auth-card form > .zp-actions {
  margin-top: 20px;
}

/* Agreement text (desk/terms.html): readable measure, keeps the line breaks */
.zp-terms-body {
  max-width: 760px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

@media (max-width: 1199px) {
  .zp-split-brand {
    padding: 48px 40px;
  }

  .zp-split-form {
    flex-basis: 440px;
    width: 440px;
    padding: 48px 32px;
  }

  .zp-split-form--wide {
    flex-basis: 600px;
    width: 600px;
  }
}

/* Stacked: the brand panel shrinks to a header strip */
@media (max-width: 991px) {
  .zp-split {
    flex-direction: column;
  }

  .zp-split-brand {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
  }

  .zp-split-brand .zp-kicker,
  .zp-split-brand p.lead-quiet,
  .zp-route-diagram {
    display: none;
  }

  .zp-split-brand h1 {
    margin: 0;
    font-size: var(--zp-fs-box);
    line-height: 1.2;
  }

  .zp-auth-mark {
    width: 24px;
    height: 24px;
  }

  .zp-split-form,
  .zp-split-form--wide {
    flex: 1 0 auto;
    justify-content: flex-start;
    width: auto;
    padding: 28px 20px 40px;
    border-left: 0;
  }

  .zp-auth-card {
    max-width: 480px;
  }

  .zp-split-form--wide .zp-auth-card {
    max-width: 640px;
  }
}

/* ---- PAGE COMPONENTS ---------------------------------------------------- */

.zp-voucher {
  padding: 18px;
  border: 1px solid var(--zp-navy);
  background: #fff;
}

.zp-voucher h2 {
  margin-top: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.zp-voucher .zp-ref {
  color: var(--zp-navy);
  font-size: var(--zp-fs-title);
  font-weight: 700;
}

.zp-picks {
  margin-top: 8px;
}

.zp-picks .btn {
  margin: 0 4px 4px 0;
}

.zp-car-pin {
  width: 16px;
  height: 16px;
  border: 3px solid var(--zp-brass);
  border-radius: 50%;
  background: var(--zp-navy);
}

.zp-policy {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d7c4a8;
  background: var(--zp-brass-tint);
}

.zp-policy p {
  margin: 0 0 6px;
}

.zp-policy p:last-child {
  margin-bottom: 0;
}

.zp-file-head {
  margin-bottom: 12px;
  padding: 14px var(--zp-gap);
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-brass);
  border-radius: var(--zp-radius);
  background: #fff;
}

.zp-file-head h2 {
  margin: 0;
  color: var(--zp-navy);
}

.zp-position-label {
  margin-top: 8px;
  color: var(--zp-navy);
  font-weight: 700;
}

.zp-hairline {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--zp-brass);
}

/* ---- TRAVELER VOUCHER (public, no AdminLTE) ----------------------------- */

.zp-traveler-body {
  margin: 0;
  background: #fff;
  color: var(--zp-navy);
}

.zp-traveler {
  max-width: 820px;
  margin: 24px auto;
  padding: 28px;
  border: 1px solid var(--zp-navy);
  background: #fff;
  color: var(--zp-navy);
  overflow-wrap: anywhere;
}

.zp-traveler h1 {
  margin: 0 0 4px;
  font-size: var(--zp-fs-title);
}

.zp-traveler h2 {
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--zp-border-soft);
  font-size: var(--zp-fs-box);
}

.zp-traveler table {
  width: 100%;
  margin-bottom: 16px;
  border-collapse: collapse;
}

.zp-traveler th {
  width: 180px;
  padding: 4px 8px 4px 0;
  font-weight: 700;
  text-align: left;
  vertical-align: top;
}

.zp-traveler td {
  padding: 4px 0;
}

/* ---- DRIVER PAGE (public, phone first) ---------------------------------- */

.zp-driver-body {
  margin: 0;
  background: var(--zp-bg);
  overflow-x: hidden;
}

.zp-driver {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--zp-gap);
}

.zp-driver h1 {
  margin: 0 0 4px;
  font-size: var(--zp-fs-title);
}

.zp-driver p {
  margin: 0 0 8px;
}

.zp-driver-job {
  margin-bottom: var(--zp-gap);
  padding: var(--zp-gap);
  border: 1px solid var(--zp-border);
  border-top: 2px solid var(--zp-navy);
  border-radius: var(--zp-radius);
  background: #fff;
}

.zp-driver-time,
.zp-driver h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.zp-driver-pay {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--zp-navy);
  color: #fff;
  font-weight: 700;
}

.zp-driver-note {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #e6cd8f;
  border-left: 3px solid var(--zp-brass);
  background: #fff4dc;
  color: #6b4a00;
}

.zp-driver .btn {
  min-height: 52px;
  margin-bottom: 8px;
  font-size: 16px;
  white-space: normal;
}

/* ---- UTILITIES (contract shared with every page) ------------------------ */

/* .zp-actions: a row of buttons, right-aligned from 768px, stacked full-width
   below with the primary (last in the markup) on top. .zp-page-actions is the
   same thing placed inside .content-header. */
.zp-actions,
.zp-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.zp-actions > .btn,
.zp-page-actions > .btn {
  margin: 0;
}

.zp-actions.zp-actions-start {
  justify-content: flex-start;
}

/* .zp-scroll: wrapper for tables that must stay tabular (run sheet, statement) */
.zp-scroll {
  position: relative; /* contains absolutely positioned .sr-only cells */
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.zp-scroll > table,
.zp-scroll > .table {
  min-width: var(--zp-scroll-min, 640px);
  margin-bottom: 0;
}

/* .zp-kv: two-column key / value grid. Children are dt + dd pairs, or
   .zp-k + .zp-v pairs. One column under 576px. */
.zp-kv {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 8px var(--zp-gap);
  margin: 0;
}

.zp-kv > dt,
.zp-kv > .zp-k {
  margin: 0;
  color: var(--zp-muted);
  font-size: var(--zp-fs-table);
  font-weight: 700;
}

.zp-kv > dd,
.zp-kv > .zp-v {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

/* .zp-hide-xs / .zp-show-xs-only: xs means under 768px */
@media (max-width: 767px) {
  .zp-hide-xs {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .zp-show-xs-only {
    display: none !important;
  }
}

/* .zp-sticky-actions: static on desktop, a bottom-fixed bar on phones.
   layout.js adds .zp-has-sticky to <body> when one is present so the footer
   keeps clear of the bar (:has() covers markup added later). */
.zp-sticky-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.zp-sidebar-overlay {
  display: none;
}

/* ---- RESPONSIVE --------------------------------------------------------- */

@media (min-width: 1440px) {
  .content,
  .content-header {
    padding-right: 24px;
    padding-left: 24px;
  }

  .content-header {
    padding-top: 20px;
  }
}

@media (max-width: 991px) {
  #dispatch-map {
    height: 360px;
  }
}

/* Phones and small tablets: off-canvas sidebar, stacked layouts */
@media screen and (max-width: 767px) {
  /* header: [hamburger] [brand] ........ [bell] [user], one 50px row */
  .skin-zemparant .main-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    height: 50px;
  }

  .skin-zemparant .main-header::before,
  .skin-zemparant .main-header::after,
  .skin-zemparant .main-header .navbar::before,
  .skin-zemparant .main-header .navbar::after {
    display: none;
  }

  .skin-zemparant .main-header .navbar {
    display: contents;
  }

  .skin-zemparant .main-header .navbar .sidebar-toggle {
    order: 0;
    float: none;
    flex: 0 0 50px;
  }

  .skin-zemparant .main-header .logo {
    order: 1;
    float: none;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0 4px;
    border-right: 0;
    background: transparent;
    line-height: 50px;
    text-align: left;
  }

  .skin-zemparant .main-header .navbar-custom-menu {
    order: 2;
    float: none;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .skin-zemparant .main-header .navbar-custom-menu > .navbar-nav {
    display: flex;
    float: none;
    margin: 0;
  }

  .skin-zemparant .main-header .navbar-custom-menu > .navbar-nav > li {
    float: none;
  }

  .skin-zemparant .main-header .navbar .navbar-nav > li > a {
    padding: 0 12px;
  }

  .skin-zemparant .main-header .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    float: none;
    width: auto;
    max-width: calc(100vw - 16px);
    margin-top: 0;
    border: 1px solid var(--zp-border);
    background: #fff;
    box-shadow: 0 6px 16px rgba(18, 40, 56, 0.18);
  }

  /* sidebar slides over the content; the overlay closes it */
  .skin-zemparant .main-sidebar,
  .skin-zemparant .left-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    width: min(280px, 86vw);
    padding-top: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(-100%, 0, 0);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }

  body.skin-zemparant.sidebar-open .main-sidebar,
  body.skin-zemparant.sidebar-open .left-side {
    transform: none;
    visibility: visible;
    box-shadow: 4px 0 16px rgba(18, 40, 56, 0.35);
    transition: transform 0.22s ease, visibility 0s;
  }

  body.skin-zemparant.sidebar-open .content-wrapper,
  body.skin-zemparant.sidebar-open .right-side,
  body.skin-zemparant.sidebar-open .main-footer {
    transform: none;
  }

  body.skin-zemparant.sidebar-open {
    overflow: hidden;
  }

  .zp-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(18, 40, 56, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
  }

  body.sidebar-open .zp-sidebar-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s, visibility 0s;
  }

  .skin-zemparant .sidebar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .skin-zemparant .sidebar-menu > li > a {
    min-height: var(--zp-touch);
    padding-top: 12px;
    padding-bottom: 12px;
  }

  /* spacing and stacking */
  .content {
    padding: 12px;
  }

  .content-header {
    padding: 12px 12px 0;
  }

  .content-header > h1 {
    font-size: 20px;
  }

  .content-header > .zp-page-actions {
    flex: 0 0 100%;
    margin-left: 0;
  }

  .main-footer {
    padding: 12px;
  }

  .row {
    margin-right: -6px;
    margin-left: -6px;
  }

  [class*="col-xs-"],
  [class*="col-sm-"],
  [class*="col-md-"],
  [class*="col-lg-"] {
    padding-right: 6px;
    padding-left: 6px;
  }

  .box-header {
    padding: 10px 12px;
  }

  .box-header > .box-tools {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .box-header > .box-tools > .btn {
    flex: 1 1 auto;
  }

  .box-body {
    padding: 12px;
  }

  .box-body.table-responsive,
  .box-body.no-padding {
    padding: 0;
  }

  .box-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 12px;
  }

  .box-footer > .pull-left {
    margin-right: 0;
  }

  .zp-actions,
  .zp-page-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: flex-start;
  }

  .zp-sticky-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1020;
    justify-content: stretch;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--zp-border);
    background: #fff;
    box-shadow: 0 -2px 6px rgba(18, 40, 56, 0.08);
  }

  .zp-sticky-actions > .btn {
    flex: 1 1 140px;
    margin: 0;
    white-space: normal;
  }

  .zp-has-sticky .main-footer,
  body:has(.zp-sticky-actions) .main-footer {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  /* KPI tiles: two across */
  .zp-kpis > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .zp-kpis > [class*="col-"]:last-child:nth-child(odd) {
    flex-basis: 100%;
    max-width: 100%;
  }

  .zp-kpi {
    min-height: 0;
    margin-bottom: 12px;
    padding: 10px 12px;
  }

  .zp-kpi .zp-kpi-value {
    font-size: 22px;
  }

  .zp-route-strip div {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--zp-border-soft);
  }

  .zp-route-strip div:nth-child(2n) {
    border-right: 0;
  }

  .zp-route-strip div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  /* wizard: a compact indicator (numbered dots, the active step is named) */
  .zp-wizard {
    gap: 6px;
    border: 0;
    background: transparent;
  }

  .zp-wizard li {
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0;
    border: 1px solid var(--zp-border);
    border-radius: 16px;
    background: #fff;
    font-size: 0;
    box-shadow: none;
  }

  .zp-wizard li::before {
    content: counter(zp-step);
    font-size: var(--zp-fs-table);
    line-height: 1;
  }

  .zp-wizard li.done {
    border-color: #b4d6c0;
    background: #e3f1e8;
  }

  .zp-wizard li.done::before {
    content: "\f00c";
    font-family: FontAwesome;
    font-size: var(--zp-fs-small);
  }

  .zp-wizard li.active {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 0 14px;
    border-color: var(--zp-brass);
    background: #fbf8f3;
    font-size: var(--zp-fs-table);
    box-shadow: none;
  }

  .zp-wizard li.active::before {
    content: none;
  }

  /* tables */
  .zp-table-stack.zp-table-stack {
    display: block;
    width: 100% !important; /* beats DataTables' inline pixel width from a wider viewport */
    min-width: 0 !important; /* beats .zp-scroll > table min-width */
    max-width: 100%;
    border: 0;
    background: transparent;
  }

  .zp-table-stack.zp-table-stack > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .zp-table-stack.zp-table-stack > tbody,
  .zp-table-stack.zp-table-stack > tfoot {
    display: block;
  }

  .zp-table-stack.zp-table-stack > tbody > tr,
  .zp-table-stack.zp-table-stack > tfoot > tr {
    display: block;
    margin: 0 0 10px;
    border: 1px solid var(--zp-border);
    border-radius: var(--zp-radius);
    background: #fff;
  }

  .zp-table-stack.zp-table-stack > tbody > tr:hover {
    background: #fff;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td,
  .zp-table-stack.zp-table-stack > tfoot > tr > td {
    position: relative;
    display: block !important;
    width: 100% !important;
    min-height: 36px;
    padding: 8px 12px 8px calc(40% + 12px) !important;
    border: 0 !important;
    border-bottom: 1px solid #f0f2f4 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td:last-child {
    border-bottom: 0 !important;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td::before {
    content: attr(data-label);
    position: absolute;
    top: 8px;
    left: 12px;
    width: calc(40% - 12px);
    overflow: hidden;
    color: var(--zp-muted);
    font-size: var(--zp-fs-small);
    font-weight: 700;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td:not([data-label]),
  .zp-table-stack.zp-table-stack > tbody > tr > td[data-label=""] {
    padding-left: 12px !important;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td:not([data-label])::before,
  .zp-table-stack.zp-table-stack > tbody > tr > td[data-label=""]::before {
    content: none;
  }

  /* action cells span the full card */
  .zp-table-stack.zp-table-stack > tbody > tr > td.zp-col-actions {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px !important;
    background: #f9fafb;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td.zp-col-actions::before {
    content: none;
  }

  .zp-table-stack.zp-table-stack > tbody > tr > td.zp-col-actions > .btn {
    flex: 1 1 120px;
    margin: 0 !important;
  }

  /* touch targets and iOS zoom: 44px controls, 16px text */
  .btn,
  .btn.btn-sm,
  .btn.btn-xs,
  .btn.btn-lg {
    min-height: var(--zp-touch);
  }

  .btn.btn-xs {
    padding: 10px 12px;
    font-size: var(--zp-fs-table);
    line-height: 20px;
  }

  .form-control,
  .input-sm,
  .input-lg,
  select.form-control,
  select.input-sm,
  select.input-lg {
    height: var(--zp-touch);
    padding: 10px 12px;
    font-size: 16px;
    line-height: 22px;
  }

  textarea.form-control,
  textarea.input-sm,
  textarea.input-lg {
    height: auto;
    min-height: 88px;
  }

  .input-group-addon {
    padding: 10px 12px;
    font-size: 16px;
  }

  .input-group-btn > .btn {
    min-height: var(--zp-touch);
  }

  .form-inline .form-group {
    display: block;
    margin-right: 0 !important;
  }

  .form-inline .form-control {
    width: 100% !important;
  }

  .checkbox label,
  .radio label {
    align-items: center;
    min-height: var(--zp-touch);
  }

  .zp-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dropdown-menu > li > a {
    min-height: var(--zp-touch);
    padding: 12px 16px;
  }

  .pagination > li > a,
  .pagination > li > span {
    min-width: var(--zp-touch);
    padding: 12px 10px;
    text-align: center;
  }

  .close {
    min-width: var(--zp-touch);
    min-height: var(--zp-touch);
  }

  /* DataTables: controls stack */
  div.dataTables_wrapper > .row {
    display: block;
  }

  div.dataTables_wrapper > .row > [class*="col-"] {
    width: 100%;
  }

  div.dataTables_wrapper div.dataTables_length,
  div.dataTables_wrapper div.dataTables_filter,
  div.dataTables_wrapper div.dataTables_info,
  div.dataTables_wrapper div.dataTables_paginate {
    padding: 8px 12px;
    text-align: left;
  }

  div.dataTables_wrapper div.dataTables_length label,
  div.dataTables_wrapper div.dataTables_filter label {
    display: flex;
    width: 100%;
  }

  div.dataTables_wrapper div.dataTables_length select,
  div.dataTables_wrapper div.dataTables_filter input {
    flex: 1 1 auto;
    width: 100%;
    height: var(--zp-touch);
    font-size: 16px;
  }

  div.dataTables_wrapper div.dataTables_paginate .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Select2 and datepicker fit the viewport and the touch target */
  .select2-container--default .select2-selection--single,
  .select2-container--default .select2-selection--multiple {
    min-height: var(--zp-touch);
  }

  .select2-container--default .select2-selection--single {
    height: var(--zp-touch);
  }

  .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 16px;
    line-height: 42px;
  }

  .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
  }

  .select2-dropdown {
    max-width: calc(100vw - 16px);
  }

  .select2-container--default .select2-results__option {
    padding: 12px;
    font-size: 16px;
  }

  .datepicker {
    max-width: calc(100vw - 16px);
  }

  .datepicker table tr td,
  .datepicker table tr th {
    width: var(--zp-touch);
    height: var(--zp-touch);
  }

  /* modals */
  .modal-dialog {
    width: auto;
    max-width: calc(100vw - 16px);
    margin: 8px;
  }

  .modal-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  /* toasts span the width */
  #toast-container.toast-top-right {
    right: 8px;
    left: 8px;
  }

  #toast-container > div {
    width: auto;
    max-width: none;
  }

  /* maps: fixed 260px */
  .leaflet-container,
  #dispatch-map {
    height: 260px !important;
  }

  .leaflet-touch .leaflet-bar a {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }

  /* driver and traveler pages */
  .zp-driver {
    padding: 12px;
  }
}

@media screen and (max-width: 575px) {
  .content-header > h1 > small {
    display: block;
    padding-left: 0;
  }

  .zp-kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .zp-kv > dt,
  .zp-kv > .zp-k {
    margin-top: 12px;
    font-size: var(--zp-fs-small);
  }

  .zp-kv > :first-child {
    margin-top: 0;
  }

  .zp-kv > dd,
  .zp-kv > .zp-v {
    margin-top: 2px;
  }

  .dl-horizontal {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .dl-horizontal dt {
    margin-top: 12px;
    font-size: var(--zp-fs-small);
  }

  .dl-horizontal dt:first-child {
    margin-top: 0;
  }

  .zp-traveler {
    margin: 12px;
    padding: 16px;
  }

  .zp-traveler table,
  .zp-traveler tbody,
  .zp-traveler tr,
  .zp-traveler th,
  .zp-traveler td {
    display: block;
    width: 100%;
  }

  .zp-traveler th {
    padding: 8px 0 0;
    color: var(--zp-muted);
    font-size: var(--zp-fs-small);
  }

  .zp-traveler td {
    padding: 0 0 6px;
    border-bottom: 1px solid var(--zp-border-soft);
  }
}

/* ---- PRINT -------------------------------------------------------------- */

@media print {
  .main-header,
  .main-sidebar,
  .main-footer,
  .zp-no-print,
  .breadcrumb,
  .zp-sidebar-overlay,
  .zp-overlay,
  .zp-sticky-actions,
  .content-header .zp-page-actions,
  #toast-container,
  .dataTables_length,
  .dataTables_filter,
  .dataTables_paginate {
    display: none !important;
  }

  html body {
    background: #fff;
    color: #000;
  }

  .content-wrapper,
  .right-side {
    margin: 0 !important;
    background: #fff !important;
  }

  .content,
  .content-header {
    padding-right: 0;
    padding-left: 0;
  }

  .box {
    border: 1px solid #999;
    border-top: 2px solid #000;
    page-break-inside: avoid;
  }

  .table-responsive,
  .zp-scroll {
    overflow: visible;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .label,
  [class*="zp-st-"] {
    border: 1px solid #000;
    background: #fff !important;
    color: #000 !important;
  }

  .zp-voucher {
    border-color: #000;
  }

  .zp-traveler {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .zp-runsheet h2 {
    page-break-after: avoid;
  }
}
