/* ==========================================================================
   Smart Trivandrum — appuser (citizen booking) module
   Built on top of styles.css design tokens (--teal, --card, --ink, etc).
   Bootstrap-free: replaces .row/.col-md-* with a small grid utility layer.
   ========================================================================== */

.appuser-body { background: var(--bg); }

/* ---- Header (re-uses .topbar/.lang-switch/.site-header from styles.css) ---- */
.appuser-header .header-inner { justify-content: space-between; }
.appuser-header .brand { display: flex; align-items: center; gap: 12px; }
.appuser-header .brand-mark img { width: 40px; height: 40px; object-fit: contain; }
.appuser-header .brand-text .b1 { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.appuser-nav { display: flex; align-items: center; gap: 8px; }
.appuser-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px;
  color: var(--ink-2); transition: background .15s var(--ease), color .15s var(--ease);
}
.appuser-nav a i { font-size: 13px; color: var(--ink-3); }
.appuser-nav a:hover { background: var(--bg-soft); color: var(--teal); }
.appuser-nav a:hover i { color: var(--teal); }
.appuser-nav a.appuser-nav-logout:hover { background: color-mix(in srgb, var(--err) 8%, white); color: var(--err); }
.appuser-nav a.appuser-nav-logout:hover i { color: var(--err); }

/* ---- Footer ---- */
.appuser-footer { background: var(--teal); color: #fff; padding: 18px 0; margin-top: 48px; }
.appuser-footer-inner {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,.85);
}
.appuser-footer-inner a { color: #fff; text-decoration: underline; }

/* ---- Page shell ---- */
.appuser-shell { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding-top: 32px; padding-bottom: 32px; align-items: start; }
.appuser-shell-nosidebar { grid-template-columns: 1fr; }
.appuser-side {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-1); position: sticky; top: 24px;
}
.appuser-side h3 { font-family: var(--font-display); font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.appuser-side p { font-size: 13.5px; color: var(--ink-3); margin: 0 0 16px; line-height: 1.5; }

.appuser-side-user {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.appuser-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(160deg, var(--teal), var(--teal-2)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
}
.appuser-side-name { font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.3; }
.appuser-side-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }

.appuser-side-nav { display: flex; flex-direction: column; gap: 4px; }
.appuser-side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.appuser-side-nav a i { width: 16px; text-align: center; color: var(--ink-3); font-size: 14px; }
.appuser-side-nav a:hover, .appuser-side-nav a.is-active { background: var(--teal-soft); color: var(--teal); }

/* Mobile-only collapse toggle for the sidebar (see the max-width:720px block below for the
   collapsed/expanded states — kept invisible/inert on desktop where the sidebar is sticky). */
.appuser-side-toggle { display: none; }
.appuser-side-nav a:hover i, .appuser-side-nav a.is-active i { color: var(--teal); }
.appuser-side-nav a.appuser-side-logout:hover { background: color-mix(in srgb, var(--err) 8%, white); color: var(--err); }
.appuser-side-nav a.appuser-side-logout:hover i { color: var(--err); }
.appuser-main {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-1); min-width: 0;
}

/* ---- Login card (single, centered) ---- */
.appuser-shell-login { display: flex; justify-content: center; padding-top: 48px; padding-bottom: 48px; }
.appuser-login-card {
  display: grid; grid-template-columns: 320px 1fr; max-width: 900px; width: 100%; min-width: 0;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden;
}
.appuser-login-brand {
  background: linear-gradient(160deg, var(--teal), var(--teal-2)); color: #fff;
  padding: 40px 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  min-width: 0;
}
.appuser-login-brand img { width: 64px; height: 64px; object-fit: contain; }
.appuser-login-brand h3 { font-family: var(--font-display); font-size: 22px; margin: 0; }
.appuser-login-brand p { font-size: 13.5px; color: rgba(255,255,255,.85); margin: 0; }
/* min-width:0 lets this grid track shrink below its content's automatic min-content size
   (e.g. an unwrapped <h2>/<label>) instead of forcing the whole card wider than the
   viewport at widths between the 720px stacking breakpoint and the 900px max-width. */
.appuser-login-form { padding: 36px 32px; min-width: 0; }

/* ---- Form grid (replaces Bootstrap .row/.col-md-*) ---- */
.form-grid, .row.register-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; margin: 0 0 20px; }
.form-col-12, .col-md-12, .col-sm-12 { grid-column: 1 / -1; }
.form-col-6, .col-md-6, .col-sm-6 { grid-column: span 1; }
.form-group { margin-bottom: 16px; }
.form-group label, .control-label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }

.register-heading {
  font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--teal);
  margin: 28px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--teal-soft);
}
.register-heading:first-child { margin-top: 0; }

/* ---- Terms & Conditions wizard step (booking.phtml / waterbooking.phtml) ---- */
.terms-scrollbox {
  max-height: 320px; overflow-y: auto; margin-bottom: 20px; padding: 4px 20px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft);
  max-width: none; /* overrides .prose's 760px cap - fill the wizard step's own width instead */
}
.terms-scrollbox.prose h3 { font-size: 15.5px; }
.terms-scrollbox.prose p,
.terms-scrollbox.prose li { font-size: 13.5px; }

/* ---- Form controls (targets Deliverelement.php output — do not rename these classes) ---- */
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="file"], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 14px;
  background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-control:focus, select:focus, textarea:focus, input:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
textarea { min-height: 84px; resize: vertical; }

/* Placeholder text: lighter + smaller than real typed content, so a field showing its
   placeholder (often the same wording as its own label, e.g. "Registration Validity") doesn't
   read like it's already filled in - browsers default placeholder color close to real text. */
.form-control::placeholder, input::placeholder, textarea::placeholder {
  color: var(--ink-4); font-size: 13.5px; font-weight: 400;
}
.icon_mandatory { background-image: none !important; padding-left: 14px !important; }
.icon_mandatory::after { content: "*"; color: var(--err); margin-left: 4px; }
label.icon_mandatory::after { content: ""; }

/* ---- Required-field marker on explicit <label> tags (icon_mandatory's ::after doesn't
   render on <input>/<select> themselves in most browsers, since they're replaced elements) ---- */
.control-label.is-required::after { content: "*"; color: var(--err); margin-left: 4px; }

/* ---- Validation errors ---- */
span.error { display: block; margin-top: 6px; }
label.error {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px !important; margin: 0 !important;
  background: color-mix(in srgb, var(--err) 10%, white);
  color: var(--err); border-radius: var(--r-xs); font-size: 13px; font-weight: 500;
}
label.error i { color: var(--err); }
.form-control.error, select.error, textarea.error, input.error { border-color: var(--err); }

/* ---- Mobile fields with a static +91 prefix (appuser.js wraps #prsnlno/#alt) ---- */
/* wrap: OTinputValidator.js's validateMobileNum() inserts its error <span> right after the
   <input> via .after() — that lands as a third flex item in this same row unless it's
   forced onto its own line below the prefix + input. */
.mobile-input-group { display: flex; flex-wrap: wrap; align-items: stretch; }
.mobile-input-group .mobile-input-prefix {
  display: flex; align-items: center; padding: 0 12px; font-size: 14.5px; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--teal-soft, #f3f7f7); white-space: nowrap;
}
/* flex-basis:0 so the input's own `width: 100%` (from .form-control above) is ignored for
   sizing purposes — with flex-basis:auto that width would make the input claim 100% of the
   row by itself and wrap below the prefix instead of sitting beside it. */
.mobile-input-group input { flex: 1 1 0%; width: auto; min-width: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.mobile-input-group > span.error { flex: 1 0 100%; margin-top: 6px; }

/* ---- Select2 (searchable ward dropdown) — match the plain .form-control look ---- */
.select2-container--default .select2-selection--single {
  height: auto; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 14px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: normal; padding: 0; color: var(--ink);
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
.select2-dropdown { border-color: var(--line-strong); }
.select2-search--dropdown .select2-search__field { border: 1px solid var(--line-strong); border-radius: var(--r-xs); }
.select2-results__option--highlighted[aria-selected] { background: var(--teal) !important; }

/* ---- Buttons ---- */
.btnRegister, .btn-primary, a.btnRegister {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--teal); color: #fff !important; border: none; border-radius: var(--r-sm);
  padding: 11px 24px; font-weight: 500; font-size: 14.5px; cursor: pointer;
  transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
  text-decoration: none;
}
.btnRegister:hover, .btn-primary:hover { background: var(--teal-2); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-secondary, .btnRegister.btn-secondary {
  background: transparent; color: var(--teal) !important; border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: var(--bg-soft); }

/* ---- Cards (login/booking/home containers already Bootstrap-styled in view files) ---- */
.container.register, .container.register-sub { max-width: none; padding: 0; }

/* ---- Wizard ---- */
.wizard-progress { display: flex; align-items: flex-start; gap: 0; margin-bottom: 32px; }
.wizard-progress-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.wizard-progress-step:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--line);
  z-index: 0;
}
.wizard-progress-step.is-done:not(:last-child)::after { background: var(--teal); }
.wizard-progress-circle {
  width: 32px; height: 32px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
  color: var(--ink-3); z-index: 1;
}
.wizard-progress-step.is-active .wizard-progress-circle { border-color: var(--teal); color: var(--teal); }
.wizard-progress-step.is-done .wizard-progress-circle { background: var(--teal); border-color: var(--teal); color: #fff; }
.wizard-progress-label { font-size: 12px; color: var(--ink-3); text-align: center; }
.wizard-progress-step.is-active .wizard-progress-label { color: var(--teal); font-weight: 600; }
.wizard-progress-compact { display: none; font-size: 13.5px; font-weight: 500; color: var(--teal); margin-bottom: 16px; }

.wizard-step.is-hidden { display: none !important; }
.wizard-nav { display: flex; gap: 12px; margin-top: 24px; margin-bottom: 24px; }

/* ---- Booking CTA cards (dashboard / history pages "New Booking" row) ---- */
.booking-cta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 0 0 32px;
}
.booking-cta-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.booking-cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: transparent; }
.booking-cta-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--teal-soft); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.booking-cta-body { min-width: 0; flex: 1; }
.booking-cta-title { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.booking-cta-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.booking-cta-arrow { flex-shrink: 0; color: var(--ink-4); font-size: 14px; transition: transform .15s var(--ease), color .15s var(--ease); }
.booking-cta-card:hover .booking-cta-arrow { transform: translateX(3px); color: var(--teal); }

/* ---- History / booking tables ---- */
.table-scroll-wrap { overflow-x: auto; }
.booking-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.booking-table th, .booking-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.booking-table th { color: var(--ink-3); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.booking-table tr:hover td { background: var(--bg-soft); }

/* ---- Booking history cards (record = action + two equal-height field rows, one bordered/shaded rectangle) ---- */
/* Note: prefixed hist- to avoid colliding with the unrelated .booking-card in styles.css (service-selection cards) */
.hist-section-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.hist-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.hist-section-header .hist-section-title { margin: 0; }
.hist-new-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  color: var(--teal); white-space: nowrap; text-decoration: none;
}
.hist-new-link:hover { text-decoration: underline; }
.hist-card-list { display: flex; flex-direction: column; gap: 14px; }
.hist-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-1); overflow: hidden; }
.hist-card.hist-card-corp { border-left: 4px solid var(--teal); background: color-mix(in srgb, var(--teal-soft) 40%, var(--card)); }
.hist-card-main { display: flex; }
.hist-card-action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-right: 1px solid var(--line); background: var(--bg-mint); text-align: center; }
.hist-card-action .btnRegister { white-space: nowrap; }
.hist-card-slno { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
/* Icon-only action buttons (View, Download PDF) - live in the footer bar (.hist-card-footer)
   alongside Connected Bookings, rather than eating a fixed-width action rail on every card. */
.hist-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--teal); color: #fff; font-size: 13px; flex-shrink: 0;
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.hist-icon-btn:hover { background: var(--teal-2, var(--teal)); transform: translateY(-1px); }
.hist-icon-btn.hist-icon-btn-secondary { background: var(--bg-soft); color: var(--ink-3); border: 1px solid var(--line); }
.hist-icon-btn.hist-icon-btn-secondary:hover { background: var(--line); color: var(--ink); }
.hist-card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hist-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 12px; }
.hist-row-secondary { grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); background: var(--bg-soft); }
.hist-row-secondary.hist-row-5col { grid-template-columns: repeat(5, 1fr); }
.hist-row-customer { grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--line); background: var(--bg-mint); }
.hist-row-ids { grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
/* Also matched with .trip-screenshot-wrap as the ancestor: the screenshot capture clones a
   .trip-card out of its .hist-card context into a standalone wrapper (see dashboard.phtml's
   buildScreenshotWrap), so these fields need to keep their styling without that ancestor. */
.hist-card .hist-field, .trip-screenshot-wrap .hist-field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hist-card .hist-field-label, .trip-screenshot-wrap .hist-field-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); }
.hist-card .hist-field-value, .trip-screenshot-wrap .hist-field-value { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--ink); word-break: break-word; }
/* inline-flex + width:max-content keep this a tight pill hugging its own text regardless of
   length ("Valid" vs "Vendor Assigned") - shared across appuser + vehicleowner pages (hero
   badges, GPS/licence/doc status, connected-booking headers), so it must look right in all
   of them, not just the one screenshot-capture context that first motivated touching this. */
.status-pill {
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  width: max-content; flex-shrink: 0; white-space: nowrap;
  padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--ink);
}
.status-pill.ok { background: var(--leaf-soft); color: var(--leaf); }
.status-pill.warn { background: color-mix(in srgb, var(--warn) 18%, white); color: var(--warn); }
.status-pill.err { background: color-mix(in srgb, var(--err) 12%, white); color: var(--err); }
.status-pill.info { background: var(--teal-soft); color: var(--teal); }

/* ---- Trip Details expand/collapse panel (Water booking view page) ---- */
.trip-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-mint); color: var(--teal); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 8px 16px; font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: background .15s var(--ease);
}
.trip-toggle:hover { background: var(--bg-soft); }
.trip-toggle-icon { transition: transform .2s var(--ease); }
.trip-toggle.is-open .trip-toggle-icon { transform: rotate(45deg); }
.trip-panel {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .35s var(--ease), opacity .3s var(--ease);
}
.trip-panel.is-open { max-height: 3000px; opacity: 1; margin-top: 14px; }
.trip-list { display: flex; flex-direction: column; gap: 10px; }
.trip-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-1);
  opacity: 0; animation: tripCardIn .35s var(--ease) forwards; animation-play-state: paused;
}
.trip-panel.is-open .trip-card { animation-play-state: running; }
.trip-card-tripno { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink-3); flex: 0 0 auto; }
.trip-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.trip-card-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
@keyframes tripCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Connected Bookings cards (dashboard's "Connected Bookings" accordion) ----
   A distinct layout from the plain .trip-card above (used by waterbookingview.phtml's "View
   All Trips" panel): stacked column with a header bar (tripno + status + share/screenshot
   icons) followed by a proper grid of fields, rather than a tripno-beside-body row. */
.trip-card.trip-card-connected { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
.trip-card-head { display: flex; align-items: center; gap: 10px; }
.trip-card-head .trip-card-tripno { font-size: 14.5px; }
.trip-card-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.trip-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--bg-soft); color: var(--ink-3); border: 1px solid var(--line); font-size: 12.5px;
  cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease);
}
.trip-icon-btn:hover { background: var(--teal-soft); color: var(--teal); }
.trip-icon-btn.is-busy { opacity: .6; pointer-events: none; }
/* Borderless field grid (reuses .hist-card .hist-field's plain label/value styling, no
   per-cell box/border) - the earlier .kv-grid/.kv-item pattern boxed every single field,
   which stacked into a wall of bordered rows on narrow screens instead of using the width. */
.trip-field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
@media (max-width: 560px) {
  .trip-field-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Screenshot branding header ---- */
/* Built only inside the off-screen wrapper that screenshotTripCard() renders via
   html2canvas (see dashboard.phtml) - never appears in the live page. Mirrors
   .appuser-header .brand's logo sizing so the exported image reads as an official
   Smart Trivandrum booking record rather than a bare card crop. */
.trip-screenshot-wrap { background: #fff; border-radius: var(--r-md); overflow: hidden; }
.trip-screenshot-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.trip-screenshot-header img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.trip-screenshot-header .b1 { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); }
.trip-screenshot-header .b2 { display: block; font-size: 12px; color: var(--ink-3); }
.trip-screenshot-wrap .trip-card { box-shadow: none; border: none; border-radius: 0; }

/* ---- Card footer bar (View/Download PDF icons, + Connected Bookings toggle when present) ---- */
/* Full-width strip along the bottom of the card (below the action rail + field rows). Holds
   the compact Connected Bookings toggle on the left and the View/Download icons on the right -
   kept together so related actions read as one control cluster instead of being split between
   a side rail and a floating corner icon. */
.hist-card-footer { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line); }
.hist-card-footer-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.hist-footer-toggle {
  display: inline-flex; width: auto; justify-content: flex-start;
  padding: 6px 12px; font-size: 12.5px; gap: 6px;
}
/* ---- Connected Bookings accordion (Water Booking History card, dashboard) ---- */
.sub-booking-accordion { border-top: 1px solid var(--line); }
.sub-booking-accordion .trip-panel.is-open { padding: 0 16px 12px; margin-top: 0; }
.subbooking-list { max-height: 480px; overflow-y: auto; }
.trip-empty { text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 8px 0; }
.trip-load-more {
  display: block; margin: 10px auto 0; padding: 6px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-3);
  font-weight: 600; font-size: 12.5px; cursor: pointer;
}
.trip-load-more:disabled { opacity: .6; cursor: default; }
.trip-call-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 100px;
  background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: 13px; text-decoration: none;
  margin-top: 6px;
}
.trip-call-btn:hover { background: var(--teal); color: #fff; }

/* ---- OTP badge (Water Booking History card, shown once payment is completed) ---- */
.hist-otp-badge {
  display: inline-block; align-self: flex-start;
  background: var(--leaf-soft); color: var(--leaf);
  padding: 2px 10px; border-radius: var(--r-xs);
  font-family: var(--font-display); font-weight: 700; letter-spacing: .06em;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--leaf) 45%, transparent);
}

/* ---- Pagination (consolidated from dashboard/septagebookingrecord/crematoriumbookingrecord) ---- */
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.pagination li a, .pagination li span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 10px; border-radius: var(--r-xs); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px;
}
.pagination li.active span, .pagination li a:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.pagination li.disabled span { color: var(--ink-4); }

/* ---- Pagination footer wrapper (shared themes/default/scripts/pagination.phtml partial —
   its Bootstrap .row/.col-sm-5/.col-sm-7 grid has no rules on appuser pages otherwise, so the
   "Show N Entries" control and the page-number list just stack unstyled; this file is only
   loaded on appuser pages, so scoping to .row here is safe). ---- */
.row:has(.dataTables_length) {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.row:has(.dataTables_length) .col-sm-5,
.row:has(.dataTables_length) .col-sm-7 { display: contents; }
.dataTables_length label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.dataTables_length select {
  width: auto; padding: 6px 28px 6px 10px; font-size: 13.5px; border-radius: var(--r-xs);
}
.dataTables_paginate { display: flex; }
@media (max-width: 560px) {
  .row:has(.dataTables_length) { justify-content: flex-start; }
}

/* ---- Detail / tab views ---- */
.detail-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 28px;
  background: var(--bg-soft); border-radius: var(--r-md); padding: 5px;
  /* .site-header (styles.css) is itself sticky at top:0 with a 76px-tall .header-inner —
     offset below it so the tab bar sticks just under the header instead of behind it. */
  position: sticky; top: 88px; z-index: 5;
}
.detail-tabs a, .detail-tabs button {
  flex: 1; min-width: max-content; text-align: center;
  padding: 10px 18px; font-size: 13.5px; font-weight: 500; color: var(--ink-3);
  border: none; background: none; border-radius: var(--r-sm); cursor: pointer;
  transition: color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.detail-tabs a:hover, .detail-tabs button:hover { color: var(--ink); }
.detail-tabs a.active, .detail-tabs button.active {
  color: #fff; font-weight: 600; background: var(--teal); box-shadow: var(--shadow-1);
}
.detail-tabs a.active:hover, .detail-tabs button.active:hover { color: #fff; }
@media (max-width: 640px) {
  .detail-tabs { flex-direction: column; }
}
.tab-content .tab-pane { display: none; }
.tab-content .tab-pane.active { display: block; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-family: var(--font-display); font-size: 15.5px; color: var(--ink-2); margin: 0 0 10px; }
.status-banner { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: 14px; }
.status-banner i { margin-right: 6px; }
.status-banner.info { background: var(--teal-soft); color: var(--teal); }
.status-banner.ok { background: var(--leaf-soft); color: var(--leaf); }
.status-banner.err { background: color-mix(in srgb, var(--err) 12%, white); color: var(--err); }

/* ---- Floating toast variant: same colour treatment as .status-banner, but detached from
   page flow so it can pop up over the content (e.g. wizard validation feedback) instead of
   pushing layout around. Fades/slides in on .is-visible, JS toggles that class. ---- */
.status-toast {
  position: fixed; left: 50%; top: 24px; z-index: 200;
  transform: translate(-50%, -12px); max-width: min(90vw, 420px);
  box-shadow: var(--shadow-2); font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.status-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* Legacy flash-message partial (themes/default/scripts/alert.phtml) restyled to fit the v3 design system.
   Its icon classes (fa-ban/fa-check/fa-warning) and Bootstrap .alert/.close markup aren't covered by the
   trimmed FA6 + no-Bootstrap bundle loaded on appuser pages, so they render unstyled without this. */
#alert_box.alert { position: relative; padding: 12px 40px 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: 14px; border: none; }
#alert_box.alert-danger { background: color-mix(in srgb, var(--err) 12%, white); color: var(--err); }
#alert_box.alert-success { background: var(--leaf-soft); color: var(--leaf); }
#alert_box.alert-warning { background: color-mix(in srgb, var(--warn) 14%, white); color: var(--warn); }
#alert_box h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
#alert_box .close { position: absolute; top: 8px; right: 10px; background: none; border: none; box-shadow: none; font-size: 20px; line-height: 1; opacity: .55; cursor: pointer; padding: 0; color: inherit; }
#alert_box .close:hover { opacity: 1; }
#alert_box .icon.fa-ban::before { content: "\f05e"; }
#alert_box .icon.fa-check::before { content: "\f00c"; }
#alert_box .icon.fa-warning::before { content: "\f071"; }
.detail-kv { width: 100%; border-collapse: collapse; }
.detail-kv td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.detail-kv td strong { color: var(--ink-2); font-weight: 600; }

/* ---- Delivery Statement tab (waterbookingview.phtml) — CSS reskin of the shared
   Water_View_Helper_Generatedelstmt table markup (also reused for PDF/email/admin views,
   so its own HTML is left untouched; this only restyles it inside the citizen-facing tab). ---- */
.delivery-statement {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 24px; overflow-x: auto;
}
.delivery-statement table.table { width: 100%; border-collapse: collapse; }
.delivery-statement table.table h3 {
  font-family: var(--font-display); color: var(--teal); font-size: 19px;
  margin: 4px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--teal-soft);
}
.delivery-statement table.table > tbody > tr:first-child td,
.delivery-statement table.table > tbody > tr:nth-child(2) td { border: none; padding: 0; }
.delivery-statement table.table > tbody > tr td {
  color: var(--ink-3); font-size: 13.5px; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.delivery-statement table.table > tbody > tr th {
  color: var(--ink); font-weight: 700; font-size: 14.5px; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.delivery-statement table.table-bordered {
  margin: 20px 0 18px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line);
}
.delivery-statement table.table-bordered th,
.delivery-statement table.table-bordered td {
  border: 1px solid var(--line); padding: 9px 10px; font-size: 13px; text-align: left;
}
.delivery-statement table.table-bordered tr:first-child th,
.delivery-statement table.table-bordered tr:first-child td {
  background: var(--teal) !important; color: #fff !important; font-family: var(--font-display); font-size: 14px; text-align: left;
}
.delivery-statement table.table-bordered tr:nth-child(2) th {
  background: var(--teal-soft); color: var(--teal); font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
}
.delivery-statement table.table-bordered tr:last-child th { background: var(--bg-soft); font-weight: 700; }
.delivery-statement table.table-bordered > tbody > tr:first-child td,
.delivery-statement table.table-bordered > tbody > tr:nth-child(2) td,
.delivery-statement table.table-bordered > tr:first-child td,
.delivery-statement table.table-bordered > tr:nth-child(2) td {
  border: 1px solid var(--line); padding: 9px 10px;
}
.delivery-statement table.table-hover tbody tr:hover td { background: var(--bg-soft); }
.delivery-statement > div {
  margin-top: 6px; padding: 12px 16px; background: var(--teal-soft); color: var(--ink-2);
  border-radius: var(--r-sm); font-size: 13px; line-height: 1.6;
}
.delivery-statement > div strong { color: var(--teal); }
@media (max-width: 640px) {
  .delivery-statement { padding: 16px; }
}

/* ---- Booking detail hero (waterbookingview / bookingview / cremationregview) ---- */
.booking-hero {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 14px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--teal-soft), transparent);
}
.booking-hero-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(160deg, var(--teal), var(--teal-2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.booking-hero-body { flex: 1; min-width: 200px; }
.booking-hero-title { font-family: var(--font-display); font-size: 15px; color: var(--ink); margin: 0 0 1px; }
.booking-hero-sub { font-size: 12px; color: var(--ink-3); }
.booking-hero-trips { flex-shrink: 0; }
.trip-progress { width: 140px; }
.trip-progress-count { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--teal); }
.trip-progress-label { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.trip-progress-bar { height: 5px; border-radius: 100px; background: var(--line); overflow: hidden; margin-top: 5px; }
.trip-progress-fill { height: 100%; background: var(--teal); border-radius: 100px; }
@media (max-width: 480px) {
  .booking-hero { padding: 12px 14px; }
  .booking-hero-trips { width: 100%; }
  .trip-progress { width: 100%; }
}

/* ---- Big OTP highlight banner (booking detail page, payment-completed bookings only) ---- */
.otp-hero {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px; margin-bottom: 16px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--teal-soft), transparent);
  border: 1px solid var(--teal-soft);
}
.otp-hero-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(160deg, var(--teal), var(--teal-2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.otp-hero-body { flex: 1; min-width: 200px; }
.otp-hero-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.otp-hero-code { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--teal); letter-spacing: .1em; line-height: 1.2; }
.otp-hero-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
@media (max-width: 480px) {
  .otp-hero { padding: 16px; }
  .otp-hero-code { font-size: 28px; }
}

/* ---- Wizard step heading + helper text ---- */
.step-heading-row { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.step-heading-row .register-heading { margin: 0; padding-bottom: 0; border-bottom: none; }
.step-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--teal-soft); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.step-helper { font-size: 13px; color: var(--ink-3); margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* ---- Booking review / receipt (bookingpreview.phtml) ---- */
.review-summary { max-width: 760px; margin: 0 auto; }
.receipt-card {
  text-align: center; background: linear-gradient(180deg, var(--teal-soft), transparent);
  border-radius: var(--r-md); padding: 28px 24px 20px; margin-bottom: 24px;
}
.receipt-card img { margin: 0 auto 10px; display: block; }
.receipt-card h2 { font-family: var(--font-display); margin: 0; font-size: 20px; color: var(--ink); }
.receipt-card p { color: var(--ink-3); margin: 2px 0 16px; font-size: 13.5px; }
.receipt-service-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 14px; border-top: 1px dashed var(--line-strong);
}
.receipt-service-badge {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--teal);
  font-family: var(--font-display); font-size: 15px;
}
.receipt-service-badge i { font-size: 14px; }
.receipt-date { font-size: 12.5px; color: var(--ink-3); }

.review-section { margin-bottom: 22px; }
.review-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.review-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 13.5px;
}
.review-section-head h3 { font-family: var(--font-display); font-size: 15.5px; color: var(--ink); margin: 0; }

.kv-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
}
/* Divider lines are drawn inside each item (not via the grid's gap/background trick), so a
   trailing empty cell — e.g. an odd number of half-width items before a kv-full one — stays
   blank instead of showing the grid's background color as a stray shaded box. */
.kv-item { background: var(--card); padding: 10px 16px; box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.kv-item.kv-full { grid-column: 1 / -1; }
.kv-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; }
.kv-value { display: block; font-size: 14px; color: var(--ink); font-weight: 500; word-break: break-word; }
@media (max-width: 560px) {
  .kv-grid { grid-template-columns: 1fr; }
}

/* ---- Inline select loading indicator (e.g. KL-based vehicle type) ---- */
.select-loading-wrap { position: relative; }
.select-loading-wrap select { padding-right: 40px; }
.select-loading-spinner { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* ---- Inline select loading indicator - indeterminate progress bar variant ---- */
.select-loading-bar {
  position: absolute; left: 1px; right: 1px; bottom: 1px; height: 3px;
  overflow: hidden; border-radius: 0 0 calc(var(--r-sm) - 1px) calc(var(--r-sm) - 1px);
  background: var(--teal-soft); pointer-events: none;
}
.select-loading-bar::after {
  content: ''; position: absolute; top: 0; left: -35%; height: 100%; width: 35%;
  background: var(--teal); border-radius: inherit;
  animation: select-loading-bar-slide 1.1s ease-in-out infinite;
}
@keyframes select-loading-bar-slide {
  0% { left: -35%; }
  50% { left: 55%; }
  100% { left: 100%; }
}

/* ---- Vehicle / tanker capacity selection cards ---- */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.vehicle-card {
  position: relative; display: block; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.vehicle-card:hover { border-color: var(--teal-2); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.vehicle-card input[type="radio"] { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; }
.vehicle-card.is-selected, .vehicle-card:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.vehicle-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-right: 24px; }
.vehicle-card-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: var(--r-sm);
  background: var(--teal-soft); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.vehicle-card-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.vehicle-card-price { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--teal); margin-bottom: 10px; }
.vehicle-card-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 10px; }
.vehicle-card-meta span strong { color: var(--ink-2); font-weight: 600; }

/* ---- Itemised tanker rate card (KL-based water capacity groups) ---- */
.tanker-rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tanker-rate-card {
  position: relative; display: block; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px 14px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.tanker-rate-card:hover { border-color: var(--teal-2); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.tanker-rate-card input[type="radio"] { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; }
.tanker-rate-card.is-selected, .tanker-rate-card:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.tanker-rate-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.tanker-rate-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--teal-soft); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tanker-rate-name { font-weight: 600; font-size: 15px; color: var(--ink); font-family: var(--font-display); }
.tanker-rate-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.tanker-rate-list { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.tanker-rate-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 13px; color: var(--ink-2);
}
.tanker-rate-row + .tanker-rate-row { border-top: 1px dashed var(--line); }
.tanker-rate-row .tanker-rate-label { color: var(--ink-3); }
.tanker-rate-row .tanker-rate-label small { display: block; font-size: 11px; color: var(--ink-3); opacity: .8; margin-top: 1px; }
.tanker-rate-row .tanker-rate-value { font-weight: 500; color: var(--ink); flex-shrink: 0; text-align: right; }
.tanker-rate-row.is-total {
  margin-top: 4px; padding: 12px 14px; border-top: none; border-radius: var(--r-sm);
  background: var(--teal-soft);
}
.tanker-rate-row.is-total .tanker-rate-label { color: var(--teal); font-weight: 700; font-size: 13.5px; }
.tanker-rate-row.is-total .tanker-rate-value { color: var(--teal); font-weight: 700; font-family: var(--font-display); font-size: 18px; }

/* ---- Loading spinner (replaces animated-gif loaders) ---- */
.spinner-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 0; }
.spinner-ring { display: inline-block; width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--teal-soft); border-top-color: var(--teal);
  animation: spinner-rotate 0.8s linear infinite; }
.spinner-ring.spinner-ring-sm { width: 20px; height: 20px; border-width: 3px; }
.spinner-label { font-size: 13.5px; color: var(--ink-3); }
@keyframes spinner-rotate { to { transform: rotate(360deg); } }

/* ---- bootstrap-datepicker widget recolor ---- */
.datepicker { border-radius: var(--r-sm); border-color: var(--line); box-shadow: var(--shadow-2); font-family: var(--font-body); }
.datepicker table tr td.active.active, .datepicker table tr td.active:hover.active,
.datepicker table tr td.today, .datepicker table tr td.today:hover { background: var(--teal) !important; background-image: none !important; color: #fff !important; }
.datepicker table tr td.day:hover { background: var(--teal-soft); }

/* ---- Responsive (breakpoint matches styles.css .wrap convention) ---- */
@media (max-width: 720px) {
  .appuser-shell, .appuser-login-card { grid-template-columns: 1fr; }
  .appuser-side { position: static; padding: 4px; }
  .appuser-main { padding: 12px; }
  .wrap.appuser-shell { padding: 0 12px; }
  .appuser-side-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 14px 16px; background: none; border: none; cursor: pointer;
    font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink);
  }
  .appuser-side-toggle i.fa-bars { color: var(--teal); margin-right: 8px; }
  .appuser-side-toggle-icon { color: var(--ink-3); transition: transform .2s var(--ease); }
  .appuser-side.is-open .appuser-side-toggle-icon { transform: rotate(180deg); }
  .appuser-side-collapsible { display: none; padding: 0 16px 16px; }
  .appuser-side.is-open .appuser-side-collapsible { display: block; }
  .form-grid, .row.register-form { grid-template-columns: 1fr; }
  .appuser-footer-inner { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; }
  /* Turns each row of Timeline/Payments/Connected Booking (all share this .booking-table +
     td[data-label] markup) into its own card instead of a plain unstyled label-over-value
     stack, so they read like the rest of the app's mobile card patterns (.hist-card etc).
     The wrapping .table-scroll-wrap exists to let a genuinely wide <table> scroll on
     desktop - once stacked into cards here there's nothing left to scroll, and leaving
     overflow-x:auto on meant the cards' own right edge/shadow rendered right at the
     scroll container's boundary with no margin, making values look clipped. */
  .table-scroll-wrap { overflow-x: visible; }
  .booking-table { display: block; }
  .booking-table thead { display: none; }
  .booking-table tbody { display: flex; flex-direction: column; gap: 12px; }
  .booking-table tr {
    display: block; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 2px 10px;
  }
  /* Grid (not flex) so the value column is a genuine minmax(0,1fr) track - flex items
     default to min-width:auto and refuse to shrink below their content size, which let
     long values (dates, vehicle numbers) push past the card's padding and sit flush
     against its edge instead of wrapping. */
  .booking-table td {
    display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px;
    border: none; border-bottom: 1px solid var(--line); padding: 10px 0; text-align: right;
    overflow-wrap: anywhere;
  }
  .booking-table td:last-child { border-bottom: none; }
  .booking-table td[data-label]::before {
    content: attr(data-label); text-align: left;
    font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  }
  /* Sl No is the least useful field on a phone (redundant with position in the list) - shrink it. */
  .booking-table td[data-label="Sl No"] { font-size: 12.5px; color: var(--ink-3); padding: 6px 0; }
  .booking-table td[data-label="Status"], .booking-table td[data-label="Status Info"] { font-weight: 700; color: var(--teal); }
  .booking-table td[data-label="Action"] { justify-content: flex-end; }
  /* Free-text fields don't fit the label-left/value-right row once they run more than a
     few words - stack them instead so long text wraps naturally under its label. */
  .booking-table td[data-label="Status Comment"] {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    text-align: left; gap: 4px;
  }
  .hist-card-main { flex-direction: column; }
  .hist-card-action { flex-direction: row; border-right: none; border-bottom: 1px solid var(--line); }
  .hist-row, .hist-row-secondary, .hist-row-secondary.hist-row-5col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .wizard-progress { display: none; }
  .wizard-progress-compact { display: block; }
  .tanker-rate-grid { grid-template-columns: 1fr; }
  .tanker-rate-card { padding: 16px 16px 12px; }
  .appuser-main { padding: 8px; }
  .wrap.appuser-shell { padding: 0 6px; }
}
