/* =========================================================
   TAXI POINT — SINGLE PAGE STYLE SYSTEM
   Source of truth for ALL app pages
========================================================= */
/* =========================
   BASE PAGE LAYOUT
   Controls: All pages (Generic container)
========================= */

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 18px 120px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0b1220;
}

/* =========================
   TYPOGRAPHY
   Controls: All pages (Headings, paragraphs)
========================= */

.page h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.page p {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 14px;
}

/* =========================
   LISTS
   Controls: All pages (Bulleted lists)
========================= */

.page ul {
  margin: 12px 0 16px;
  padding-left: 0;
  list-style: none;
}

.page li {
  padding: 10px 0;
  font-size: 15px;
  color: #111827;
  display: flex;
  gap: 10px;
  align-items: center;
}

.page li::before {
  content: "•";
  color: #16a34a;
  font-weight: bold;
}

/* =========================
   MUTED / CALLOUT
   Controls: All pages (Secondary text, info boxes)
========================= */

.page .muted {
  font-size: 13px;
  color: #6b7280;
  margin-top: 18px;
}

.page .callout {
  margin-top: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  border-left: 4px solid #16a34a;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
}

/* =========================
   GLOBAL PAGE HEADER (TOP BAR)
   Controls: All pages with sticky header
========================= */

.page-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 12px;
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.back-btn {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: #0b1220;
}

.back-btn:active {
  opacity: 0.6;
}

#app {
  margin-top: 0;
}

.page-header + #app {
  margin-top: 56px;
}

/* =========================
   UI COMPONENTS
   Controls: All pages (Reusable components)
========================= */

.page-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 15px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.4;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

/* =========================
   FORMS
   Controls: All pages (Form inputs and labels)
========================= */

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

.field-input {
  width: 100%;
  padding: 14px 14px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
  color: #9ca3af;
}

.field-input:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.12);
}

/* =========================
   PRIMARY BUTTON
   Controls: All pages (Main action button)
========================= */

.primary-btn {
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(180deg, #ff8a1f, #ff7a00);
  box-shadow: 0 6px 16px rgba(255, 122, 0, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  border: none;
  color: #fff;
}

.primary-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(255, 122, 0, 0.3);
}

/* =========================
   GENERIC TP COMPONENTS
   Controls: Legacy/Generic pages (Older components)
========================= */

.tp-page {
  padding: 16px;
  font-family: system-ui, -apple-system, sans-serif;
}

.tp-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.tp-card input,
.tp-card button {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.tp-card button {
  background: #000;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.tp-note {
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.6;
}

/* =========================
   TRIPS PAGE — TAXI POINT PRO UI
   Controls: Trips/History page (Uber/Bolt style)
========================= */

.tp-trips-page {
  padding: 12px 12px 120px;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f8fafc;
}

/* ---------- HEADER ---------- */

.tp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tp-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#tp-reload-btn {
  border: none;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#tp-reload-btn:active {
  transform: scale(0.96);
}

/* ---------- STATUS TABS ---------- */

.tp-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tp-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tp-tab.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  box-shadow: 0 6px 16px rgba(17,24,39,0.25);
}

/* ---------- EMPTY STATE ---------- */

.tp-center {
  height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  gap: 10px;
  font-size: 14px;
}

.hidden {
  display: none;
}

/* ---------- DATE GROUP ---------- */

.tp-date-group {
  margin-top: 18px;
}

.tp-date-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  padding-left: 4px;
}

.tp-trip-card {
  background: #ffffff;
  border-radius: 18px;
  margin-bottom: 12px;
  padding-bottom: 12px; /* ✅ NEW */
  box-shadow:
    0 10px 22px rgba(0,0,0,0.06),
    0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tp-trip-card:active {
  transform: translateY(1px);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.05),
    0 1px 3px rgba(0,0,0,0.04);
}

/* ---------- TOP ROW ---------- */

.tp-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tp-time {
  font-size: 16px;
  font-weight: 700;
  color: #0b1220;
}

/* =========================
   TRIP STATUS ROW (CENTERED + SEPARATORS)
========================= */

.tp-trip-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-align: center;
  position: relative;
}

/* horizontal separators */
.tp-trip-status::before,
.tp-trip-status::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.tp-trip-status span {
  background: #ffffff;
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* status colors */
.tp-trip-status.pending span {
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.tp-trip-status.confirmed span {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.tp-trip-status.ontrip span {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

/* ===== Trip status (centered with separators - premium style) ===== */
.tp-status-pill {
  margin: 10px 0 12px;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

/* ---------- META INFO ---------- */

.tp-meta {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.tp-loc-text:first-child {
  margin-bottom: 10px; /* space between pickup & dropoff */
}
/* =========================
   REAL SWIPE BUTTON — TAXI POINT
========================= */

.tp-swipe-bar {
  width: 68%;
  margin: 14px auto 6px; /* top + bottom spacing */
  padding: 3px;
  background: rgba(34,197,94,0.12); /* green base */
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 999px;
  height: 44px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.tp-swipe-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  pointer-events: none;
}
.tp-swipe-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  transition: width 0.1s linear;
  z-index: 1;
}
.tp-swipe-bar:has(.tp-swipe-progress[style*="width"]) .tp-swipe-track {
  color: white;
}
.tp-swipe-handle {
  position: absolute;
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ef4444; /* 🔴 red */
  color: white;
  box-shadow: 0 6px 16px rgba(239,68,68,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
  z-index: 2;
}
/* ================================
   UPDATED TRIPS PAGE STYLES
   Integrated without duplication
================================ */

/* Timeline row (date left / time right) */
.tp-timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.tp-date-left {
  text-transform: capitalize;
}

.tp-time-right {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

/* Card header (Ride ID left / Fare right) */
.tp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 6px;
}

.tp-ride-id {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.tp-price {
  font-size: 15px;
  font-weight: 700;
  color: #ff7a00;
}

/* Fix route spacing (no overlapping pins) */
.tp-loc {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  padding: 6px 16px 4px;
}

/* Updated route line with proper spacing */
.tp-route-line {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; /* ✅ keeps dots visible */
  height: 42px;                   /* ✅ forces vertical spacing */
  margin-top: 2px;
}
.tp-route-line::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, #22c55e, #ef4444);
}
/* dots */
.tp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 2;
  flex-shrink: 0;
}
.tp-dot.green { background: #22c55e; }
.tp-dot.red { background: #ef4444; }

/* Text with proper spacing */
.tp-loc-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #111827;
  margin-bottom: 6px;
}

.tp-loc-text span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

/* Booking ID */
.tp-booking-id {
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
}

/* ================================
   PROFILE PAGE — PREMIUM UI STYLE
================================ */

.profile-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: #111;
  background: #f7f9fc;
}

/* HEADER */
.profile-header {
  margin-bottom: 16px;
}

.profile-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
}

/* HERO CARD */
.profile-hero {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 18px;
}

/* AVATAR */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8cff, #7aa2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(91, 140, 255, 0.35);
}

.profile-avatar-icon {
  font-size: 32px;
  color: #fff;
}

/* NAME */
.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* CONTACT */
.profile-contact {
  font-size: 13.5px;
  color: #555;
  line-height: 1.4;
  margin-bottom: 8px;
}

.profile-contact div {
  margin-top: 2px;
}

/* RATING */
.profile-rating {
  font-size: 16px;
  letter-spacing: 2px;
  color: #ffb703;
  margin-top: 6px;
}

/* STATS GRID */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.profile-stat {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.stat-label {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}

/* ACTION BUTTONS */
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* BUTTON BASE */
.profile-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e6e9f0;
  background: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.profile-action:hover {
  background: #f0f4ff;
  border-color: #d6defa;
  transform: translateY(-1px);
}

/* ICON */
.action-icon {
  font-size: 18px;
}

/* DELETE BUTTON */
.profile-action.danger {
  color: #d62828;
  border-color: #f3d6d6;
  background: #fff5f5;
}

.profile-action.danger:hover {
  background: #ffeaea;
  border-color: #f0bcbc;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-title {
    font-size: 20px;
  }

  .profile-name {
    font-size: 18px;
  }
}

/* ================================
   EDIT PROFILE PAGE — MATCH PROFILE
================================ */

.edit-profile-page {
  max-width: 720px;
}

.edit-profile-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 18px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.edit-profile-avatar {
  margin: 0 auto 12px;
}

.edit-profile-heading {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  text-align: center;
  margin-bottom: 4px;
}

.edit-profile-subtitle {
  font-size: 13.5px;
  color: #667085;
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.45;
}

.edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edit-profile-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.edit-profile-form label {
  font-size: 13.5px;
  font-weight: 600;
  color: #344054;
}

.edit-profile-form input {
  width: 100%;
  height: 48px;
  border: 1px solid #dbe2ee;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  font-size: 15px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-sizing: border-box;
}

.edit-profile-form input::placeholder {
  color: #98a2b3;
}

.edit-profile-form input:focus {
  border-color: #7aa2ff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}

.edit-profile-form input[disabled],
.edit-profile-form input[readonly] {
  color: #667085;
  background: #f3f6fb;
  cursor: not-allowed;
  opacity: 1;
}

.edit-profile-form .form-hint {
  font-size: 12px;
  color: #667085;
  margin-top: -2px;
}

.edit-profile-form .profile-action.save {
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  border: 1px solid #5b8cff;
  background: linear-gradient(135deg, #5b8cff, #7aa2ff);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(91, 140, 255, 0.26);
}

.edit-profile-form .profile-action.save:hover {
  background: linear-gradient(135deg, #4f83ff, #709bff);
  border-color: #4f83ff;
  transform: translateY(-1px);
}

.edit-profile-form .profile-action.save .action-icon,
.edit-profile-form .profile-action.save .action-label {
  color: #ffffff;
}

@media (max-width: 480px) {
  .edit-profile-card {
    padding: 18px 14px 14px;
    border-radius: 16px;
  }

  .edit-profile-heading {
    font-size: 18px;
  }
}


/* ================================
   PREMIUM MODAL — TAXI POINT
================================ */

body.tp-premium-modal-open {
  overflow: hidden;
}

.tp-premium-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 14, 28, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tp-premium-modal-overlay.is-visible {
  opacity: 1;
}

.tp-premium-modal-card {
  width: min(100%, 420px);
  background: #ffffff;
  border-radius: 22px;
  padding: 20px 18px 16px;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.22),
    0 8px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(8px) scale(0.985);
  animation: tpPremiumModalIn 0.18s ease forwards;
}

.tp-premium-modal-card.is-danger {
  border: 1px solid rgba(220, 38, 38, 0.12);
}

@keyframes tpPremiumModalIn {
  to {
    transform: translateY(0) scale(1);
  }
}

.tp-premium-modal-card.is-shake {
  animation: tpPremiumModalShake 0.25s ease;
}

@keyframes tpPremiumModalShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
}

.tp-premium-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tp-premium-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef4ff, #dfeaff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  font-size: 20px;
}

.tp-premium-modal-icon.is-danger {
  background: linear-gradient(135deg, #fff1f2, #ffe3e6);
}

.tp-premium-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.tp-premium-modal-message {
  font-size: 14px;
  line-height: 1.55;
  color: #475467;
  white-space: pre-line;
  margin-bottom: 14px;
}

.tp-premium-modal-input {
  width: 100%;
  height: 50px;
  border: 1px solid #dbe2ee;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  font-size: 16px;
  padding: 0 14px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tp-premium-modal-input:focus {
  border-color: #7aa2ff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}

.tp-premium-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tp-premium-modal-btn {
  min-width: 96px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.tp-premium-modal-btn:hover {
  transform: translateY(-1px);
}

.tp-premium-modal-btn.is-secondary {
  background: #eef2f7;
  color: #344054;
}

.tp-premium-modal-btn.is-primary {
  background: linear-gradient(135deg, #5b8cff, #7aa2ff);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(91, 140, 255, 0.25);
}

.tp-premium-modal-btn.is-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

@media (max-width: 480px) {
  .tp-premium-modal-overlay {
    padding: 16px;
  }

  .tp-premium-modal-card {
    width: 100%;
    border-radius: 20px;
    padding: 18px 16px 14px;
  }

  .tp-premium-modal-actions {
    gap: 8px;
  }

  .tp-premium-modal-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* =========================
   SETTINGS PAGE — TAXI POINT PREMIUM UI
========================= */

.tp-settings-page {
  padding: 16px 14px 120px;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f8fafc;
}

.tp-settings-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* SECTION */

.tp-settings-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 6px 0;
  margin-bottom: 14px;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.06),
    0 2px 6px rgba(0,0,0,0.04);
}

.tp-settings-section.danger {
  border: 1px solid rgba(239,68,68,0.25);
}

/* HEADER */

.tp-settings-header {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  padding: 10px 16px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ITEM */

.tp-setting-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  border-top: 1px solid #f1f5f9;
}

.tp-setting-item:first-of-type {
  border-top: none;
}

.tp-setting-item.clickable {
  cursor: pointer;
}

.tp-setting-item.clickable:hover {
  background: #f8fafc;
}

/* ICON */

.tp-setting-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

/* LABEL */

.tp-setting-label {
  flex: 1;
}

/* VALUE */

.tp-setting-value {
  font-size: 13px;
  color: #6b7280;
  margin-right: 4px;
}

/* ARROW */

.tp-arrow {
  font-size: 16px;
  color: #9ca3af;
}

/* SWITCH */

.tp-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.tp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tp-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e5e7eb;
  border-radius: 999px;
  transition: 0.2s;
}

.tp-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.tp-switch input:checked + .tp-slider {
  background: #22c55e;
}

.tp-switch input:checked + .tp-slider::before {
  transform: translateX(20px);
}

/* DANGER BUTTON */

.tp-danger-btn {
  width: calc(100% - 32px);
  margin: 12px 16px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #ef4444;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(239,68,68,0.35);
}

.tp-danger-btn:active {
  transform: scale(0.98);
}
/* ================================
   LOGIN PAGE — TAXI POINT PREMIUM
================================ */

.tp-login-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 18px 40px;
  font-family: system-ui, -apple-system, sans-serif;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* HERO */

.tp-login-hero {
  margin-bottom: 26px;
}

.tp-login-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a1f, #ff7a00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
  box-shadow: 0 10px 24px rgba(255,122,0,0.35);
}

.tp-login-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.tp-login-subtitle {
  font-size: 14px;
  color: #6b7280;
}

/* CARD */

.tp-login-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow:
    0 12px 30px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.04);
  text-align: left;
}

/* FIELD */

.tp-login-field {
  margin-bottom: 14px;
}

.tp-login-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

.tp-login-input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  font-size: 16px;
  background: #fff;
  transition: 0.15s ease;
}

.tp-login-input:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255,122,0,0.12);
}

/* BUTTON */

.tp-login-btn {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #ff8a1f, #ff7a00);
  box-shadow: 0 8px 20px rgba(255,122,0,0.35);
  cursor: pointer;
  transition: 0.12s ease;
}

.tp-login-btn:active {
  transform: translateY(1px);
  box-shadow: 0 5px 14px rgba(255,122,0,0.3);
}

/* LINKS */

.tp-login-link {
  width: 100%;
  margin-top: 10px;
  border: none;
  background: none;
  font-size: 13px;
  color: #ff7a00;
  font-weight: 600;
  cursor: pointer;
}

/* FOOTER */

.tp-login-footer {
  margin-top: 22px;
  font-size: 13px;
  color: #6b7280;
}

.tp-login-guest-btn {
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #22c55e;
  background: #ecfdf5;
  color: #065f46;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

.tp-login-guest-btn:hover {
  background: #d1fae5;
}

/* UTIL */

.hidden {
  display: none !important;
}

/* =========================
   LOGIN PHONE UX — SAFE APPEND
========================= */

.tp-login-note {
  margin-top: 10px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}

.tp-login-phone-shell {
  position: relative;
}

.tp-login-helper {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
}

.tp-login-phone-shell .iti {
  width: 100%;
}

.tp-login-phone-shell .iti__country-container {
  z-index: 3;
}

.tp-login-phone-shell .iti__selected-country-primary {
  height: 100%;
  padding-left: 12px;
  padding-right: 10px;
  border-radius: 14px 0 0 14px;
}

.tp-login-phone-shell .iti--separate-dial-code .iti__selected-dial-code {
  font-weight: 600;
  color: #111827;
}

.tp-login-phone-shell .iti input,
.tp-login-phone-shell .iti input.tp-login-input,
.tp-login-phone-shell .iti--separate-dial-code input {
  width: 100%;
  padding-left: 118px !important;
}

.tp-login-phone-shell .iti__flag-container:hover .iti__selected-country-primary,
.tp-login-phone-shell .iti__selected-country-primary:focus {
  background: rgba(15, 23, 42, 0.04);
}

.tp-login-phone-shell .iti__country-list {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  color: #111827;
}

.tp-login-phone-shell .iti__country {
  padding-top: 10px;
  padding-bottom: 10px;
}

.tp-login-phone-shell .iti__country.iti__highlight {
  background: rgba(59, 130, 246, 0.10);
}

.tp-login-phone-shell .iti__search-input {
  border-radius: 10px;
}

/* =========================
   LOGIN OVERRIDE — MATCH BOOKING PHONE STYLE
========================= */

.tp-login-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 8px 40px;
  background: #f4f7fb;
}

.tp-login-card {
  background: linear-gradient(90deg, #f3f5f8 0%, #d7dde6 56%, #0b132b 100%);
  border: 1px solid rgba(11, 19, 43, 0.14);
  box-shadow:
    0 14px 32px rgba(11, 19, 43, 0.12),
    0 3px 10px rgba(0, 0, 0, 0.05);
}

.tp-login-note {
  margin-top: 10px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  text-align: center;
}

.tp-login-phone-shell {
  position: relative;
}

.tp-login-helper {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.tp-login-phone-shell .iti {
  width: 100%;
}

.tp-login-phone-shell .iti__country-container {
  z-index: 4;
  padding: 1px;
}

.tp-login-phone-shell .iti__selected-country {
  height: 48px;
}

.tp-login-phone-shell .iti__selected-country-primary {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px 0 12px;
  border-radius: 14px 0 0 14px;
  background: transparent;
}

.tp-login-phone-shell .iti__selected-dial-code {
  color: #0b132b !important;
  font-weight: 700;
  margin-left: 6px;
}

.tp-login-phone-shell .iti__arrow {
  border-top-color: #334155 !important;
}

.tp-login-phone-shell .iti input,
.tp-login-phone-shell .iti input.tp-login-input,
.tp-login-phone-shell .iti input.iti__tel-input,
.tp-login-phone-shell .iti--separate-dial-code input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  padding-left: 118px !important;
  background: #ffffff;
}

.tp-login-phone-shell .iti__country-list {
  z-index: 2147483647 !important;
  border-radius: 14px;
  border: 1px solid rgba(11, 19, 43, 0.10);
  box-shadow: 0 16px 40px rgba(11, 19, 43, 0.18);
}

.tp-login-phone-shell .iti__country {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px !important;
}

.tp-login-phone-shell .iti__country-name {
  color: #0b132b !important;
}

.tp-login-phone-shell .iti__dial-code {
  color: #334155 !important;
  font-weight: 700 !important;
  margin-left: auto;
}

.tp-login-phone-shell .iti__country:hover,
.tp-login-phone-shell .iti__country.iti__highlight {
  background: #f1f5f9 !important;
}

.tp-login-phone-shell .iti__search-input {
  border-radius: 10px;
}

@media (max-width: 520px) {
  .tp-login-page {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* =========================
   LOGIN PHONE FIX — SHOW FLAG + DIAL CODE
========================= */

.tp-login-phone-shell .iti__country-container {
  z-index: 5;
  padding: 0 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 92px;
  background: transparent;
}

.tp-login-phone-shell .iti__selected-country {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  flex: 0 0 auto;
}

.tp-login-phone-shell .iti__selected-country-primary {
  padding: 0 4px 0 0;
  background: transparent !important;
}

.tp-login-phone-shell .iti__selected-dial-code {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  height: 48px;
  color: #0b132b !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 48px;
  opacity: 1 !important;
  visibility: visible !important;
  white-space: nowrap;
}

.tp-login-phone-shell .iti input,
.tp-login-phone-shell .iti input.tp-login-input,
.tp-login-phone-shell .iti input.iti__tel-input,
.tp-login-phone-shell .iti--separate-dial-code input {
  padding-left: 106px !important;
}

.tp-login-phone-shell .iti__arrow {
  margin-left: 4px !important;
}

/* =========================
   LOGIN PHONE FIELD — SAME PATTERN AS BOOKING FLOW
========================= */

.tp-login-phone-pill {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  overflow: hidden;
  padding: 0 12px;
}

.tp-login-phone-pill .i {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.tp-login-phone-pill input {
  flex: 1 1 auto;
  width: 100%;
  height: 46px;
  border: none !important;
  background: transparent !important;
  color: #0b132b !important;
  box-shadow: none !important;
  padding: 0 12px !important;
  font-size: 16px;
}

.tp-login-phone-pill input:focus {
  outline: none;
  box-shadow: none !important;
}

.tp-login-phone-pill:focus-within {
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255,122,0,0.12);
}

.tp-login-phone-pill .iti {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.tp-login-phone-pill .iti__flag-container {
  position: absolute;
  left: 8px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid #e5e7eb;
  padding-right: 8px;
  margin-right: 8px;
}

.tp-login-phone-pill.iti-ready .i {
  display: none !important;
}

.tp-login-phone-pill .iti--allow-dropdown input,
.tp-login-phone-pill .iti input.iti__tel-input,
.tp-login-phone-pill .iti input[type="tel"] {
  background: #ffffff !important;
  color: #0b132b !important;
  padding-left: 52px !important;
}

.tp-login-phone-pill .iti__selected-country {
  padding-right: 8px !important;
}

.tp-login-phone-pill .iti__selected-dial-code {
  display: none !important;
}

.tp-login-phone-pill .iti__country-list {
  z-index: 2147483647 !important;
  background: #ffffff !important;
  color: #0b132b !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.20) !important;
  border-radius: 10px !important;
  overflow: auto !important;
}

.tp-login-phone-pill .iti__country {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px !important;
}

.tp-login-phone-pill .iti__country-name {
  color: #0b132b !important;
}

.tp-login-phone-pill .iti__country .iti__dial-code {
  color: #334155 !important;
  font-weight: 700 !important;
  margin-left: auto;
}

.tp-login-phone-pill .iti__country:hover,
.tp-login-phone-pill .iti__country.iti__highlight {
  background: #f1f5f9 !important;
}

.tp-login-phone-pill .iti__search-input {
  background: #ffffff !important;
  color: #0b132b !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  padding: 6px 8px 6px 28px !important;
  margin: 6px !important;
  background-position: 8px center !important;
}

.tp-login-phone-pill .iti__search-input::placeholder {
  color: #64748b !important;
}

/* =========================
   LOGIN HERO BRAND LOGO
========================= */

.tp-login-page .tp-login-logo{
  width: 89px;
  height: 89px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  box-shadow:
    0 6px 12px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
  overflow: hidden;
  box-sizing: border-box;
}

.tp-login-page .tp-login-logo-img{
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  flex: 0 0 auto;
  border-radius: 16px;
}

.tp-login-page .tp-login-logo-img.hidden{
  display: none !important;
}

.tp-login-page #loginBrandLogoFallback{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}

/* Tenant brand modal/button overrides */
.tp-premium-modal-card {
  background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--tp-brand-color, #1e293b) 10%, #ffffff)) !important;
}

.tp-premium-modal-card.is-danger {
  background: linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--tp-danger-color, #ef4444) 12%, #ffffff)) !important;
}

.tp-premium-modal-icon {
  background: color-mix(in srgb, var(--tp-brand-color, #1e293b) 16%, #ffffff) !important;
}

.tp-premium-modal-icon.is-danger,
.tp-premium-modal-btn.is-danger {
  background: var(--tp-danger-color, #ef4444) !important;
}

.tp-premium-modal-btn.is-primary,
.tp-life-modal-btn.is-primary {
  background: var(--tp-brand-color, #1e293b) !important;
  border-color: var(--tp-brand-color, #1e293b) !important;
}

/* =========================================================
   CUSTOMER APP BRAND UI - SINGLE SOURCE FINAL
   Sheet/card colors come from Super Admin.
   Field rows use readable field-surface vars from branding.js.
   Do not style .iti__flag because flags rely on sprite positions.
========================================================= */

:root {
  --tp-sheet-gradient-normal: var(
    --tp-sheet-gradient,
    linear-gradient(
      90deg,
      var(--tp-brand-color, #1e293b) 0%,
      var(--tp-brand-secondary-color, #0f172a) 100%
    )
  );

  --tp-sheet-gradient-reverse: linear-gradient(
    90deg,
    var(--tp-brand-secondary-color, #0f172a) 0%,
    var(--tp-brand-color, #1e293b) 100%
  );

  --tp-text-on-brand: #ffffff;
  --tp-muted-text-on-brand: rgba(255,255,255,.78);
  --tp-text-on-action: #ffffff;
  --tp-text-on-danger: #ffffff;

  --tp-field-surface: rgba(15,23,42,.28);
  --tp-field-surface-strong: rgba(15,23,42,.38);
  --tp-field-border: rgba(255,255,255,.18);
  --tp-field-text: #ffffff;
  --tp-field-muted-text: rgba(255,255,255,.74);
}

/* Main sheets */
.m-sheet,
.mobile-sheet,
.tp-sheet,
.tp-bottom-sheet,
.bottom-sheet,
.tp-life-modal-card,
.tp-premium-modal-card {
  background: var(--tp-sheet-gradient-normal) !important;
  color: var(--tp-text-on-brand, #ffffff) !important;
}

/* Step cards */
#mobileFlow,
.m-step,
.m-card,
#m-step1,
#m-step2,
#m-step3,
#m-step4 {
  background: var(--tp-sheet-gradient-reverse) !important;
  color: var(--tp-text-on-brand, #ffffff) !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  box-shadow: 0 18px 38px rgba(15,23,42,.22) !important;
}

/* Remove old pseudo overlays */
.m-sheet::before,
.m-sheet::after,
.m-card::before,
.m-card::after,
.m-step::before,
.m-step::after,
.mobile-sheet::before,
.mobile-sheet::after,
.tp-sheet::before,
.tp-sheet::after,
.tp-bottom-sheet::before,
.tp-bottom-sheet::after,
.bottom-sheet::before,
.bottom-sheet::after {
  background: transparent !important;
}

/* Field rows: readable neutral surface, not half-dark gradient */
.m-card .m-pill,
.m-card .m-inputpill,
.m-card .m-row,
.m-card .m-field,
.m-card .m-field-row,
.m-card .field,
.m-card .u-field,
.m-card .input-wrap,
#m-field-slot label,
#m-field-slot .input-wrap,
#m-field-slot > div,
#m-step1 .m-pill,
#m-step1 .m-row,
#m-step2 .m-pill,
#m-step2 .m-row,
#m-step2 .field,
#m-step2 .u-field,
#m-step2 label,
#m-step3 .m-pill,
#m-step3 .m-row,
#m-step3 .field,
#m-step3 .u-field,
#m-step3 label,
#m-step3 .input-wrap {
  background: var(--tp-field-surface, rgba(15,23,42,.28)) !important;
  color: var(--tp-field-text, #ffffff) !important;
  border: 1px solid var(--tp-field-border, rgba(255,255,255,.18)) !important;
  outline: 0 !important;
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10) !important;
}

/* Child cells inside date/time/pax/bags: no alien blocks */
.m-card .m-pill > *,
.m-card .m-inputpill > *,
.m-card .m-row > *,
#m-step1 .m-pill > *,
#m-step1 .m-row > *,
#m-step2 .m-pill > *,
#m-step2 .m-row > *,
#m-step3 .m-pill > *,
#m-step3 .m-row > * {
  background: transparent !important;
  color: var(--tp-field-text, #ffffff) !important;
  border-color: var(--tp-field-border, rgba(255,255,255,.18)) !important;
}

/* Strong selected/value cell when needed */
.m-card .is-active,
.m-card .selected,
.m-card [aria-selected="true"] {
  background: var(--tp-field-surface-strong, rgba(15,23,42,.38)) !important;
  color: var(--tp-field-text, #ffffff) !important;
}

/* Inputs */
.m-card input,
.m-card select,
.m-card textarea,
#m-field-slot input,
#m-step2 input,
#m-step2 select,
#m-step3 input,
#m-step3 select,
#m-step3 textarea,
.iti input.iti__tel-input,
.iti input[type="tel"] {
  background: transparent !important;
  color: var(--tp-field-text, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-field-text, #ffffff) !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.m-card input::placeholder,
.m-card textarea::placeholder,
#m-field-slot input::placeholder,
#m-step2 input::placeholder,
#m-step3 input::placeholder,
#m-step3 textarea::placeholder,
.iti input.iti__tel-input::placeholder,
.iti input[type="tel"]::placeholder {
  color: var(--tp-field-muted-text, rgba(255,255,255,.74)) !important;
  -webkit-text-fill-color: var(--tp-field-muted-text, rgba(255,255,255,.74)) !important;
}

/* General text */
.m-card,
.m-card *,
.m-step,
.m-step * {
  color: inherit;
}

.m-card .m-title,
.m-card .m-head,
.m-card .label,
.m-card .value,
#m-step2 .label,
#m-step2 .value,
#m-step3 .label,
#m-step3 .value {
  color: var(--tp-field-text, #ffffff) !important;
}

.m-card .m-divider,
.m-divider {
  border-color: var(--tp-field-border, rgba(255,255,255,.18)) !important;
  opacity: .75 !important;
}

/* Phone field naturalization */
.iti,
.m-card .iti,
#m-step3 .iti {
  width: 100% !important;
  background: transparent !important;
}

.iti__flag-container,
.iti__selected-flag,
.m-card .iti__flag-container,
.m-card .iti__selected-flag,
#m-step3 .iti__flag-container,
#m-step3 .iti__selected-flag {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* This gives natural spacing only; it does not touch .iti__flag */
.iti__selected-flag,
.m-card .iti__selected-flag,
#m-step3 .iti__selected-flag {
  border-radius: 10px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.iti__selected-dial-code,
.m-card .iti__selected-dial-code,
#m-step3 .iti__selected-dial-code {
  color: var(--tp-field-text, #ffffff) !important;
}

/* Country dropdown stays readable and independent */
.iti__country-list {
  background: rgba(15,23,42,.96) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 18px 38px rgba(15,23,42,.32) !important;
}

.iti__country,
.iti__country-name,
.iti__dial-code {
  color: #ffffff !important;
}

.iti__country:hover,
.iti__country.iti__highlight,
.iti__highlight {
  background: color-mix(in srgb, var(--tp-brand-color, #1e293b) 35%, transparent) !important;
}

/* Country search input stays normal */
.iti__search-input,
.iti__country-list .iti__search-input,
.iti__country-list input[type="search"],
.iti__country-list input[type="text"] {
  background: #ffffff !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border: 1px solid rgba(15,23,42,.18) !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Buttons */
.m-card .m-actions,
.m-card .actions,
#m-step1 .m-actions,
#m-step2 .m-actions,
#m-step3 .m-actions,
#m-step4 .m-actions {
  gap: 10px !important;
}

#m-step2 .m-actions button:first-child,
#m-step2 .actions button:first-child,
#m-step3 .m-actions button:first-child,
#m-step3 .actions button:first-child,
#m-step4 .m-actions button:first-child,
#m-step4 .actions button:first-child,
.m-card button.danger,
.m-card .danger,
.tp-premium-modal-btn.is-danger,
.tp-life-modal-btn.is-danger {
  background: var(--tp-danger-color, #ef4444) !important;
  border: 0 !important;
  color: var(--tp-text-on-danger, #ffffff) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(15,23,42,.12) !important;
}


.tp-premium-modal-btn.is-secondary,
.tp-life-modal-btn.is-secondary {
  background: var(--tp-field-surface-strong, rgba(15,23,42,.38)) !important;
  border: 1px solid var(--tp-field-border, rgba(255,255,255,.18)) !important;
  color: var(--tp-field-text, #ffffff) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 18px rgba(15,23,42,.10) !important;
}

#m-step1 .m-actions button:last-child,
#m-step1 .actions button:last-child,
#m-step1 button:only-of-type,
#m-step2 .m-actions button:last-child,
#m-step2 .actions button:last-child,
#m-step3 .m-actions button:last-child,
#m-step3 .actions button:last-child,
#m-step4 .m-actions button:last-child,
#m-step4 .actions button:last-child,
.m-card button.primary,
.m-card .primary,
.m-card .primary-btn,
.m-card .primary-button,
.primary-btn,
.primary-button,
.btn-primary,
button.primary,
.tp-premium-modal-btn.is-primary,
.tp-life-modal-btn.is-primary {
  background: var(--tp-accent-color, #22c55e) !important;
  border: 0 !important;
  color: var(--tp-text-on-action, #ffffff) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(15,23,42,.12) !important;
}

/* Header/menu branding */
.menu-header,
.drawer-header,
.tp-menu-header,
.app-header,
.page-header,
.top-bar,
.topbar {
  background: var(--tp-sheet-gradient-normal) !important;
  color: var(--tp-text-on-brand, #ffffff) !important;
}

/* Logo rings */
.tp-login-logo,
.tp-premium-modal-brand.has-logo,
.tp-life-modal-brand.has-logo {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    var(--tp-sheet-gradient-normal) border-box !important;
  border: 2px solid transparent !important;
  box-shadow:
    0 14px 32px color-mix(in srgb, var(--tp-brand-color, #1e293b) 18%, transparent),
    0 0 0 5px color-mix(in srgb, var(--tp-brand-secondary-color, #0f172a) 10%, transparent) !important;
}

.tp-login-logo-img,
.tp-premium-modal-brand-logo,
.tp-life-modal-brand-logo {
  background: #ffffff !important;
  border-radius: inherit !important;
  padding: 0 !important;
  object-fit: contain !important;
  transform: scale(1.35) !important;
  transform-origin: center center !important;
}

/* Autofill cleanup inside branded cards only */
.m-card input:-webkit-autofill,
.m-card textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--tp-field-text, #ffffff) !important;
  transition: background-color 9999s ease-in-out 0s !important;
}


/* =========================================================
   CUSTOMER TENANT-SAFE PREMIUM CONTRAST FIX
   Uses tenant brand variables, but keeps modal/sheet text readable.
========================================================= */

:root {
  --tp-safe-dark-brand-gradient: linear-gradient(
    135deg,
    color-mix(in srgb, var(--tp-brand-secondary-color, #0f172a) 82%, #020617 18%) 0%,
    color-mix(in srgb, var(--tp-brand-color, #1e293b) 70%, #020617 30%) 58%,
    color-mix(in srgb, var(--tp-brand-secondary-color, #0f172a) 76%, #ffffff 24%) 100%
  );

  --tp-safe-card-surface: rgba(255,255,255,.94);
  --tp-safe-card-text: #111827;
  --tp-safe-card-muted: #475569;
  --tp-safe-dark-text: #ffffff;
  --tp-safe-dark-muted: rgba(255,255,255,.76);
}

/* Lifecycle/status modals: completed, accepted, arrived, cancelled */
.tp-life-modal-card,
.tp-premium-modal-card {
  background:
    radial-gradient(circle at top center, color-mix(in srgb, var(--tp-accent-color, #22c55e) 18%, transparent), transparent 36%),
    var(--tp-safe-dark-brand-gradient) !important;
  color: var(--tp-safe-dark-text) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow:
    0 26px 80px rgba(2,6,23,.42),
    inset 0 1px 0 rgba(255,255,255,.10) !important;
}

.tp-life-modal-title,
.tp-life-modal-message,
.tp-premium-modal-title,
.tp-premium-modal-message {
  color: var(--tp-safe-dark-text) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.18) !important;
}

.tp-life-modal-message,
.tp-premium-modal-message {
  color: var(--tp-safe-dark-muted) !important;
}

.tp-life-modal-icon,
.tp-premium-modal-icon {
  background: var(--tp-accent-color, #22c55e) !important;
  color: #111827 !important;
  box-shadow:
    0 10px 22px rgba(2,6,23,.20),
    inset 0 1px 0 rgba(255,255,255,.35) !important;
}

.tp-life-modal-btn.is-primary,
.tp-premium-modal-btn.is-primary {
  background: var(--tp-accent-color, #22c55e) !important;
  color: var(--tp-text-on-action, #ffffff) !important;
  border: 0 !important;
}

.tp-life-modal-btn.is-secondary,
.tp-premium-modal-btn.is-secondary {
  background: rgba(255,255,255,.92) !important;
  color: #111827 !important;
  border: 1px solid rgba(15,23,42,.12) !important;
}

/* Tracking driver card: keep premium but readable */
#m-step4 .m-driver-card,
.m-driver-card {
  background: var(--tp-safe-card-surface) !important;
  color: var(--tp-safe-card-text) !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  box-shadow:
    0 14px 34px rgba(2,6,23,.18),
    inset 0 1px 0 rgba(255,255,255,.88) !important;
}

#m-step4 .m-driver-card *,
.m-driver-card * {
  color: inherit !important;
}

#m-step4 .m-driver-card .muted,
.m-driver-card .muted,
#m-step4 .m-driver-card small,
.m-driver-card small {
  color: var(--tp-safe-card-muted) !important;
}

/* Tracking call/chat/cancel buttons */
#m-step4 .m-btn.ghost,
.m-btn.ghost {
  background: rgba(255,255,255,.94) !important;
  color: #111827 !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  box-shadow: 0 8px 18px rgba(2,6,23,.10) !important;
}

#m-step4 .m-btn.danger,
.m-btn.danger {
  background: var(--tp-danger-color, #ef4444) !important;
  color: #ffffff !important;
  border: 0 !important;
}

/* Active tracking sheet text safety */
body.__tp-tracking .m-card,
body.__tp-tracking .m-step,
body.__tp-tracking .mobile-sheet {
  color: var(--tp-safe-dark-text) !important;
}

body.__tp-tracking .m-card .label,
body.__tp-tracking .m-card .value,
body.__tp-tracking .m-step .label,
body.__tp-tracking .m-step .value {
  color: var(--tp-safe-dark-text) !important;
}

body.__tp-tracking .m-card .muted,
body.__tp-tracking .m-step .muted {
  color: var(--tp-safe-dark-muted) !important;
}

/* =========================================================
   FINAL INTELLIGENT TENANT CONTRAST SYSTEM
   Tenant branding remains dashboard-driven.
   Text/background contrast is protected automatically.
========================================================= */

:root {
  --tp-modal-gradient: linear-gradient(135deg, var(--tp-brand-color, #1e293b), var(--tp-brand-secondary-color, #0f172a));
  --tp-modal-text: #ffffff;
  --tp-modal-muted-text: rgba(255,255,255,.78);
  --tp-modal-border: rgba(255,255,255,.16);
  --tp-modal-overlay: rgba(2,6,23,.66);
  --tp-modal-brand-chip-bg: var(--tp-brand-color, #1e293b);
  --tp-modal-brand-chip-text: var(--tp-text-on-brand, #ffffff);
  --tp-modal-icon-bg: var(--tp-accent-color, #22c55e);
  --tp-modal-icon-text: var(--tp-text-on-action, #ffffff);
  --tp-back-button-bg: rgba(255,255,255,.16);
  --tp-back-button-border: rgba(255,255,255,.24);
}

/* Back arrow readable on any tenant header */
.back-btn,
.page-header .back-btn,
.app-header .back-btn,
.top-bar .back-btn,
.topbar .back-btn {
  color: var(--tp-text-on-brand, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-text-on-brand, #ffffff) !important;
  background: var(--tp-back-button-bg) !important;
  border: 1px solid var(--tp-back-button-border) !important;
  border-radius: 999px !important;
  width: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Premium modals: branded, but contrast-safe */
.tp-premium-modal-overlay {
  background: var(--tp-modal-overlay) !important;
  backdrop-filter: blur(10px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
}

.tp-premium-modal-card,
.tp-premium-modal-card.is-danger {
  background:
    radial-gradient(circle at top center, color-mix(in srgb, var(--tp-accent-color, #22c55e) 16%, transparent), transparent 36%),
    var(--tp-modal-gradient) !important;
  color: var(--tp-modal-text) !important;
  border: 1px solid var(--tp-modal-border) !important;
  text-shadow: none !important;
}

.tp-premium-modal-title {
  color: var(--tp-modal-text) !important;
  -webkit-text-fill-color: var(--tp-modal-text) !important;
  text-shadow: none !important;
}

.tp-premium-modal-message {
  color: var(--tp-modal-muted-text) !important;
  -webkit-text-fill-color: var(--tp-modal-muted-text) !important;
  text-shadow: none !important;
}

.tp-premium-modal-brand {
  background: var(--tp-modal-brand-chip-bg) !important;
  color: var(--tp-modal-brand-chip-text) !important;
  -webkit-text-fill-color: var(--tp-modal-brand-chip-text) !important;
  border: 1px solid var(--tp-modal-border) !important;
}

.tp-premium-modal-brand.has-logo {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    var(--tp-modal-gradient) border-box !important;
  border: 2px solid transparent !important;
}

.tp-premium-modal-icon {
  background: var(--tp-modal-icon-bg) !important;
  color: var(--tp-modal-icon-text) !important;
  -webkit-text-fill-color: var(--tp-modal-icon-text) !important;
}

.tp-premium-modal-icon.is-danger {
  background: var(--tp-danger-color, #ef4444) !important;
  color: var(--tp-text-on-danger, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-text-on-danger, #ffffff) !important;
}

.tp-premium-modal-btn.is-secondary {
  background: var(--tp-modal-secondary-btn-bg, rgba(255,255,255,.92)) !important;
  color: var(--tp-modal-secondary-btn-text, #111827) !important;
  -webkit-text-fill-color: var(--tp-modal-secondary-btn-text, #111827) !important;
  border: 1px solid var(--tp-modal-border) !important;
}

.tp-premium-modal-btn.is-primary {
  background: var(--tp-accent-color, #22c55e) !important;
  color: var(--tp-text-on-action, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-text-on-action, #ffffff) !important;
}

.tp-premium-modal-btn.is-danger {
  background: var(--tp-danger-color, #ef4444) !important;
  color: var(--tp-text-on-danger, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-text-on-danger, #ffffff) !important;
}

/* =========================================================
   FINAL SMART HEADER + BACK ARROW CONTRAST GUARD
   Header background stays tenant-branded.
   Text/arrow contrast is calculated from tenant colour brightness.
========================================================= */

.page-header#pageHeader {
  background: var(--tp-header-bg, var(--tp-sheet-gradient-normal)) !important;
  color: var(--tp-header-text, #ffffff) !important;
  border-bottom: 1px solid var(--tp-header-border, rgba(255,255,255,.18)) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.10) !important;
}

.page-header#pageHeader .page-title,
#pageTitle {
  color: var(--tp-header-text, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-header-text, #ffffff) !important;
  font-weight: 800 !important;
}

.page-header#pageHeader .back-btn,
#backButton {
  color: var(--tp-header-back-text, var(--tp-header-text, #ffffff)) !important;
  -webkit-text-fill-color: var(--tp-header-back-text, var(--tp-header-text, #ffffff)) !important;
  background: var(--tp-header-back-bg, rgba(255,255,255,.16)) !important;
  border: 1px solid var(--tp-header-back-border, rgba(255,255,255,.26)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 6px 16px rgba(15,23,42,.16) !important;
  border-radius: 999px !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 23px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

.page-header#pageHeader .page-title,
#pageTitle {
  color: var(--tp-text-on-brand, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-text-on-brand, #ffffff) !important;
  font-weight: 800 !important;
}

.page-header#pageHeader .back-btn,
#backButton {
  color: var(--tp-text-on-brand, #ffffff) !important;
  -webkit-text-fill-color: var(--tp-text-on-brand, #ffffff) !important;
  background: var(--tp-back-button-bg, rgba(255,255,255,.18)) !important;
  border: 1px solid var(--tp-back-button-border, rgba(255,255,255,.28)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 6px 16px rgba(15,23,42,.16) !important;
  border-radius: 999px !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 23px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}
