/* Yoder Toter admin design system — aligned with the customer site's #4caf50 theme. */
:root {
  --yt-green: #4caf50;
  --yt-green-dark: #2e7d32;
  --yt-green-deep: #17351f;
  --yt-green-soft: #e8f5e9;
  --yt-green-pale: #f3faf4;
  --yt-border: #e1e8e2;
  --yt-ink: #1f2933;
  --yt-muted: #6b7780;
  --yt-surface: #ffffff;
  --yt-canvas: #f5f7f5;
  --primary: #4caf50;
}

html, body { background: var(--yt-canvas); color: var(--yt-ink); }
body { font-size: 14px; letter-spacing: -.005em; }
.content-wrapper { background: var(--yt-canvas); }
.content { padding-bottom: 1.5rem; }
.container-fluid { padding-left: 1.25rem; padding-right: 1.25rem; }

/* Top navigation */
.main-header.navbar,
.theme-navbar-primary {
  background: var(--yt-green) !important;
  border: 0;
  box-shadow: 0 2px 10px rgba(25, 70, 34, .16);
}
.main-header .nav-link { color: rgba(15, 39, 20, .82) !important; }
.main-header .nav-link:hover { color: #071b0b !important; }
.portal-header-title {
  align-items: center;
  color: #102714;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 700;
  margin-left: .35rem;
}
.portal-header-title i { margin-right: .45rem; opacity: .72; }
.portal-logout-label { font-size: .78rem; font-weight: 600; margin-left: .35rem; }

/* Driver earnings pill in the top bar. The outer div is a transparent track
   that claims the space between the menu button and the right-hand icons and
   centres the pill in it, instead of the percentage margin that used to drift
   with viewport width. */
.driver-profit {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  margin: 0 .5rem;
  min-width: 0;
}
.driver-profit__pill {
  align-items: baseline;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  display: inline-flex;
  gap: .4rem;
  max-width: 100%;
  padding: .3rem .85rem;
  white-space: nowrap;
}
.driver-profit__label {
  color: rgba(255, 255, 255, .9);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.driver-profit__value {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}
@media (max-width: 575px) {
  .driver-profit { margin: 0 .25rem; }
  .driver-profit__pill { gap: .3rem; padding: .25rem .6rem; }
  .driver-profit__label { font-size: .62rem; letter-spacing: .04em; }
  .driver-profit__value { font-size: 1rem; }
}
@media (max-width: 360px) {
  .driver-profit__label { display: none; }
}

/* Sidebar */
.main-sidebar {
  background: var(--yt-green-deep) !important;
  box-shadow: 3px 0 14px rgba(15, 41, 21, .12) !important;
}
.main-sidebar .brand-link {
  align-items: center;
  background: #102b17;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  min-height: 58px;
  padding: .62rem .85rem;
}
.layout-navbar-fixed .wrapper .sidebar-dark-warning .brand-link:not([class*="navbar"]),
.layout-sm-navbar-fixed .wrapper .sidebar-dark-warning .brand-link:not([class*="navbar"]),
.layout-md-navbar-fixed .wrapper .sidebar-dark-warning .brand-link:not([class*="navbar"]),
.layout-lg-navbar-fixed .wrapper .sidebar-dark-warning .brand-link:not([class*="navbar"]),
.layout-xl-navbar-fixed .wrapper .sidebar-dark-warning .brand-link:not([class*="navbar"]) {
  background: var(--yt-green) !important;
  border-bottom-color: rgba(16, 39, 20, .16) !important;
}
.main-sidebar .brand-image {
  background: #fff;
  border: 2px solid rgba(255,255,255,.7);
  height: 36px;
  margin: 0 .7rem 0 0;
  object-fit: cover;
  width: 36px;
}
.portal-brand-copy { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.portal-brand-name { color: #102714; font-size: .92rem; font-weight: 700; }
.portal-brand-user { color: rgba(16, 39, 20, .7); font-size: .68rem; margin-top: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar { padding: .6rem .55rem 1rem; }
.nav-sidebar .nav-header {
  color: #8ebc99;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 1.15rem .65rem .35rem;
  text-transform: uppercase;
}
.nav-sidebar .nav-item { margin-bottom: .16rem; }
.nav-sidebar .nav-link {
  border-radius: 7px;
  color: #d8e8dc !important;
  font-size: .82rem;
  padding: .6rem .7rem;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-sidebar .nav-link:hover {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
  transform: translateX(1px);
}
.nav-sidebar .nav-link.active,
.sidebar-dark-warning .nav-sidebar > .nav-item > .nav-link.active {
  background: var(--yt-green) !important;
  box-shadow: none !important;
  color: #102714 !important;
  font-weight: 700;
}
.nav-sidebar .nav-icon { color: #94c5a0; font-size: .92rem !important; margin-right: .45rem !important; }
.nav-sidebar .nav-link.active .nav-icon { color: #17351f; }
.nav-treeview { padding-left: .45rem; }
.nav-treeview > .nav-item > .nav-link { color: #bfd5c4 !important; font-size: .78rem; padding-bottom: .5rem; padding-top: .5rem; }
.nav-treeview > .nav-item > .nav-link.active { background: rgba(76,175,80,.2) !important; color: #c8e6c9 !important; }

/* Page headings and breadcrumbs */
.content-header { padding: 1.2rem .5rem .75rem; }
.content-header h1 {
  color: var(--yt-ink) !important;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.025em;
}
.breadcrumb { background: transparent; font-size: .76rem; margin: .35rem 0 0; padding: 0; }
.breadcrumb-item a, a { color: var(--yt-green-dark); }
.breadcrumb-item a:hover, a:hover { color: #1b5e20; }
.breadcrumb-item.active { color: #859089; }

/* Cards and panels */
.card,
.info-box,
.small-box,
.callout {
  border: 1px solid var(--yt-border);
  border-radius: 11px;
  box-shadow: 0 3px 14px rgba(35, 60, 41, .055);
  overflow: hidden;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--yt-border);
  padding: .9rem 1.05rem;
}
.card-title { color: var(--yt-ink); font-size: .95rem; font-weight: 700; }
.card-body { padding: 1.05rem; }
.card-footer { background: #fbfcfb; border-top: 1px solid var(--yt-border); }
.info-box { min-height: 82px; }
.info-box .info-box-icon { background: var(--yt-green-soft); border-radius: 9px; color: var(--yt-green-dark); margin: .55rem; width: 58px; }
.info-box-number { color: var(--yt-ink); font-size: 1.15rem; }

/* Forms */
label, .form-label { color: #3e4a42; font-size: .8rem; font-weight: 600; }
.form-control,
.custom-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-color: #d5ded7;
  border-radius: 7px;
  min-height: 39px;
}
.form-control:focus,
.custom-select:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--yt-green);
  box-shadow: 0 0 0 3px rgba(76,175,80,.14);
}
.input-group-text { background: #f1f6f2; border-color: #d5ded7; color: #526158; }
.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--yt-green);
  border-color: var(--yt-green);
}
.form-required, .text-danger { color: #d84444 !important; }

/* Buttons and interactive controls */
.btn { border-radius: 7px; font-size: .8rem; font-weight: 600; }
.btn-primary,
.btn-info,
.btn-success,
.bg-primary,
.bg-info,
.badge-primary,
.badge-info {
  background-color: var(--yt-green) !important;
  border-color: var(--yt-green) !important;
  color: #102714 !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus,
.btn-success:hover,
.btn-success:focus {
  background-color: #43a047 !important;
  border-color: #3d9141 !important;
  color: #0b2110 !important;
}
.btn-outline-primary,
.btn-outline-info,
.btn-outline-success { border-color: var(--yt-green); color: var(--yt-green-dark); }
.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover {
  background: var(--yt-green);
  border-color: var(--yt-green);
  color: #102714;
}
.btn-light { background: #f4f7f4; border-color: #dce4dd; color: #455149; }
.text-primary, .text-info, .text-success { color: var(--yt-green-dark) !important; }
.border-primary, .border-info, .border-success { border-color: var(--yt-green) !important; }
.page-link { color: var(--yt-green-dark); }
.page-item.active .page-link { background: var(--yt-green); border-color: var(--yt-green); color: #102714; }

/* Tables and list pages */
.table { color: #344039; margin-bottom: 0; }
.table thead th {
  background: #f1f7f2;
  border-bottom: 1px solid #d8e5da;
  color: #445249;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .035em;
  padding: .72rem .75rem;
  text-transform: uppercase;
  vertical-align: middle;
}
.table td { border-top-color: #edf1ed; padding: .72rem .75rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--yt-green-pale); }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select { border: 1px solid #d5ded7; border-radius: 6px; }
.dropdown-menu { border: 1px solid var(--yt-border); border-radius: 8px; box-shadow: 0 8px 28px rgba(26, 51, 32, .12); }
.dropdown-item.active, .dropdown-item:active { background: var(--yt-green); color: #102714; }

/* Alerts, tabs, and modal surfaces */
.alert-info { background: var(--yt-green-soft); border-color: #c8e6c9; color: #285c31; }
.nav-tabs .nav-link.active { border-top: 2px solid var(--yt-green); color: var(--yt-green-dark); font-weight: 700; }
.modal-content { border: 0; border-radius: 11px; box-shadow: 0 14px 48px rgba(20, 45, 26, .2); overflow: hidden; }
.modal-header { border-bottom-color: var(--yt-border); }
.progress-bar { background: var(--yt-green); }

/* Footer and responsive behavior */
.main-footer { background: #fff; border-top: 1px solid var(--yt-border); color: var(--yt-muted); font-size: .75rem; }
@media (max-width: 767.98px) {
  .container-fluid { padding-left: .8rem; padding-right: .8rem; }
  .content-header { padding-left: .15rem; padding-right: .15rem; }
  .content-header h1 { font-size: 1.25rem; }
  .card-body { padding: .85rem; }
  .table-responsive { border-radius: 8px; }
  .portal-header-title { display: none; }
}

/* Authentication screens */
.login-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(200,230,201,.28), transparent 28rem),
    linear-gradient(145deg, #102b17, #2e7d32);
  min-height: 100vh;
}
.login-box { width: 390px; }
.login-box .card { border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(5, 31, 12, .28); }
.login-card-body { border-radius: 14px; padding: 2rem; }
.portal-login-brand { margin-bottom: 1.5rem; text-align: center; }
.portal-login-mark {
  align-items: center; background: var(--yt-green-soft); border-radius: 50%; color: var(--yt-green-dark);
  display: inline-flex; font-size: 1.25rem; height: 52px; justify-content: center; margin-bottom: .75rem; width: 52px;
}
.portal-login-brand h1 { color: var(--yt-ink); font-size: 1.25rem; font-weight: 700; margin: 0; }
.portal-login-brand p { color: var(--yt-muted); font-size: .78rem; margin: .3rem 0 0; }
.login-card-body .btn-primary { padding: .55rem 1rem; }
@media (max-width: 440px) { .login-box { margin: 1rem; width: calc(100% - 2rem); } }

/* Driver portal — modern app-style trip/route list cards.
   Scoped to .driver-trip-list so it only affects the driver-facing listing
   pages (dashboard available/ongoing routes, ongoing/upcoming/completed
   booking lists) without touching admin trip tables elsewhere in the app.
   The markup is still literal <table><tr><th>/<td> rows (shared with JS
   hooks/modals we don't want to touch) — this reflows them with display
   overrides into flex label/value rows so it reads as a modern list, not
   a spreadsheet, while packing more cards per row as width allows. */
.driver-trip-list { margin-left: -5px; margin-right: -5px; }
.driver-trip-list > [class*="col-"] { margin-bottom: 8px; padding-left: 5px; padding-right: 5px; }
.driver-trip-list > .col-12 h1 { margin-bottom: .5rem !important; font-size: 1.1rem; }
.driver-trip-list .card { border: 1px solid #e3e8e5; border-radius: 12px; box-shadow: 0 2px 8px rgba(20,55,35,.06); margin-bottom: 0; }
.driver-trip-list .card-body { padding: 12px; }

/* Header row: trip-type chip on the left, date/time stacked on the right */
.driver-trip-list .d-flex.cardheaderstatus { align-items: center; border-bottom: 1px solid #edf0ee; margin-bottom: 8px; padding-bottom: 8px; }
.driver-trip-list .bdgstatus:empty,
.driver-trip-list .cardheaderstatus > .bdgstatus { display: none; }
.driver-trip-list .d-flex.cardheaderstatus h5 {
  background: #e8f5e9; border-radius: 20px; color: #1d7140; display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4;
  margin: 0; padding: 4px 11px; text-transform: uppercase; white-space: nowrap;
}
.driver-trip-list .dattim { margin-left: auto; text-align: right; }
.driver-trip-list .dattim p { color: #65736b; font-size: .72rem; line-height: 1.3; margin: 0; }
.driver-trip-list .dattim p:first-child { color: #21382b; font-weight: 700; }

/* Detail rows: turn <table><tr><th>/<td> into compact label/value flex rows */
.driver-trip-list table.table-bordered,
.driver-trip-list table.blockdetails { border: 0; display: block; font-size: .8rem; margin-bottom: 8px; width: 100%; }
.driver-trip-list table.table-bordered tbody,
.driver-trip-list table.blockdetails tbody { display: block; }
.driver-trip-list table.table-bordered tr {
  align-items: baseline; border: 0; border-bottom: 1px solid #f0f3f1; display: flex;
  gap: 10px; justify-content: space-between; padding: 4px 0;
}
.driver-trip-list table.table-bordered tr:last-child { border-bottom: 0; }
.driver-trip-list table.table-bordered th {
  background: none; border: 0; color: #8a978f; flex: 0 0 auto; font-size: .68rem;
  font-weight: 700; letter-spacing: .02em; padding: 0; text-transform: uppercase; white-space: nowrap;
}
.driver-trip-list table.table-bordered td {
  border: 0; color: #263d2f; flex: 1 1 auto; font-weight: 600; overflow-wrap: anywhere;
  padding: 0; text-align: right;
}
.driver-trip-list table.table-bordered td .btn.p-0 { color: #1d7140; font-weight: 700; line-height: 1.3; }
.driver-trip-list table.table-bordered .badge { font-size: .66rem; padding: 3px 8px; }
.driver-trip-list table.table-bordered td a[style*="float"] {
  color: #1d7140; display: inline-block; float: none !important; font-weight: 700; margin-left: 8px; white-space: nowrap;
}

/* Stat strip (trip type / stops / passengers / wait) as pill chips */
.driver-trip-list table.blockdetails tr { display: flex; flex-wrap: wrap; gap: 6px; }
.driver-trip-list table.blockdetails td {
  background: #f3faf4; border: 0; border-radius: 20px; color: #1d7140; flex: 0 0 auto;
  font-size: .7rem; font-weight: 700; padding: 4px 10px; text-align: center;
}

/* Action buttons: flex-wrap so multiple buttons never clip or overlap */
.driver-trip-list table.btnssec,
.driver-trip-list table.btnssecloafing { display: block; width: 100%; }
.driver-trip-list table.btnssec tbody,
.driver-trip-list table.btnssecloafing tbody { display: block; }
.driver-trip-list table.btnssec tr,
.driver-trip-list table.btnssecloafing tr { display: flex; flex-wrap: wrap; gap: 6px; }
.driver-trip-list table.btnssec th,
.driver-trip-list table.btnssecloafing th { border: 0; flex: 1 1 84px; padding: 0; }
.driver-trip-list table.btnssec .btn,
.driver-trip-list table.btnssecloafing .btn {
  align-items: center; border-radius: 8px; display: flex; font-size: .74rem; font-weight: 700;
  justify-content: center; line-height: 1.25; min-height: 32px; padding: 6px 8px;
  text-align: center; white-space: normal; width: 100%; word-break: break-word;
}
@media (max-width: 480px) {
  .driver-trip-list table.btnssec th,
  .driver-trip-list table.btnssecloafing th { flex-basis: 46%; }
}

/* Column widths for the card grid. Below the md breakpoint .col-md-6 carries no
   width of its own, so as a flex child it sizes to its content and a wide card
   can push past the viewport -- pin it to one full-width column instead.
   The trip card lays route + stats side by side and needs ~440px to breathe:
   two per row normally, three only on very wide screens. */
.driver-trip-list > .col-md-6 { flex: 0 0 100%; max-width: 100%; min-width: 0; }
@media (min-width: 768px) {
  .driver-trip-list > .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 1600px) {
  .driver-trip-list > .col-md-6 { flex: 0 0 33.3333%; max-width: 33.3333%; }
}

/* ============================================================
   Driver trip card
   Shared by the driver dashboard (route offers + ongoing/upcoming)
   and the ongoing / upcoming / completed trip listing pages.
   Markup lives in views/driver_trip_card.php.
   ============================================================ */
.trip-card {
  background: #fff;
  border: 1px solid #e3e8e5;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(20, 55, 35, .05);
  margin-bottom: 1rem;
  overflow: hidden;
  width: 100%;
}

/* Attention strip for instant bookings */
.trip-card__banner {
  background: #d9362e;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 7px 12px;
  text-align: center;
  text-transform: uppercase;
}
/* Pulses between two reds so the white label stays readable throughout. */
.trip-card__banner--pulse { animation: tripCardPulse 1.2s infinite alternate; }
@keyframes tripCardPulse {
  from { background: #d9362e; }
  to { background: #8d1b15; }
}

/* --- Header: date/time on the left, fact chips on the right --- */
.trip-card__head {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  padding: 20px;
}
.trip-card__when {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}
.trip-card__when > i {
  color: var(--yt-green-dark, #2e7d32);
  font-size: 1.9rem;
  line-height: 1;
}
.trip-card__date {
  color: #1d1d1d;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}
.trip-card__time {
  color: var(--yt-green-dark, #2e7d32);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
}
.trip-card__chips {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 7px;
}
.trip-card__chip {
  align-items: center;
  background: var(--yt-green-pale, #f3faf4);
  border-radius: 7px;
  color: #21382b;
  display: flex;
  font-size: .78rem;
  font-weight: 600;
  gap: 9px;
  padding: 7px 12px;
}
.trip-card__chip i { color: var(--yt-green-dark, #2e7d32); width: 1em; text-align: center; }
.trip-card__chip--accent { color: var(--yt-green-dark, #2e7d32); }
.trip-card__chip--warn { background: #fff6d8; color: #8a650c; }
.trip-card__chip--warn i { color: #b8860b; }

/* --- Body: route timeline beside the stat column --- */
.trip-card__body {
  border-top: 1px solid #edf0ee;
  display: flex;
  gap: 20px;
  padding: 18px 20px;
}
.trip-card__route { flex: 1 1 auto; min-width: 0; }
.trip-card__point {
  display: grid;
  gap: 12px;
  grid-template-columns: 20px 1fr;
  padding-bottom: 16px;
  position: relative;
}
.trip-card__point:last-child { padding-bottom: 0; }
/* Dotted connector between consecutive points */
.trip-card__point:not(:last-child)::before {
  border-left: 3px dotted #b9dcc6;
  bottom: 2px;
  content: "";
  left: 8px;
  position: absolute;
  top: 22px;
}
.trip-card__pin { font-size: 1.15rem; line-height: 1.1; text-align: center; }
.trip-card__pin--start { color: var(--yt-green-deep, #17351f); }
.trip-card__pin--stop { color: #d7a21e; }
.trip-card__pin--end { color: #c0392b; }
.trip-card__label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.trip-card__label--start { color: var(--yt-green-dark, #2e7d32); }
.trip-card__label--stop { color: #a37a0c; }
.trip-card__label--end { color: #c0392b; }
.trip-card__place {
  color: #1d2b22;
  display: block;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
a.trip-card__place:hover { color: var(--yt-green-dark, #2e7d32); text-decoration: underline; }
.trip-card__wait {
  color: #8a650c;
  display: inline-block;
  font-size: .76rem;
  font-weight: 600;
  margin-top: 3px;
}

.trip-card__stats {
  border-left: 1px solid #edf0ee;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 14px;
  padding-left: 20px;
  width: 42%;
  max-width: 220px;
}
.trip-card__stat { align-items: center; display: flex; gap: 12px; }
.trip-card__stat > i {
  color: var(--yt-green-dark, #2e7d32);
  flex: 0 0 auto;
  font-size: 1.35rem;
  text-align: center;
  width: 1.5rem;
}
.trip-card__stat-label {
  color: #718078;
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.trip-card__stat-value {
  color: #1d2b22;
  display: block;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
}
.trip-card__stat--pay .trip-card__stat-value {
  color: var(--yt-green-dark, #2e7d32);
  font-size: 1.2rem;
}

/* --- Meta grid --- */
.trip-card__meta {
  border-top: 1px solid #edf0ee;
  display: grid;
  gap: 15px 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px 20px;
}
.trip-card__meta-label {
  color: #718078;
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.trip-card__meta-value {
  color: #1d2b22;
  display: block;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.trip-card__meta-value a { color: var(--yt-green-dark, #2e7d32); font-weight: 700; white-space: nowrap; }

/* --- Actions: keep the existing btnssec tables, restyle to match --- */
.trip-card__actions { padding: 4px 20px 18px; }
.trip-card__actions table.btnssec,
.trip-card__actions table.btnssecloafing { display: block; margin-bottom: 0; width: 100%; }
.trip-card__actions table.btnssec tbody,
.trip-card__actions table.btnssecloafing tbody { display: block; width: 100%; }
.trip-card__actions table.btnssec tr,
.trip-card__actions table.btnssecloafing tr { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
/* min-width:0 lets long labels ("Add Waiting Time") shrink instead of forcing
   the row wider than the card. Selector weight matches the generic
   .driver-trip-list rules above so this one wins by source order. */
.trip-card__actions table.btnssec th,
.trip-card__actions table.btnssecloafing th { border: 0; flex: 1 1 110px; min-width: 0; padding: 0; }
.trip-card__actions .btn {
  border-radius: 9px !important;
  font-size: .84rem !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
}
/* Accept / Start / Complete -> solid deep green */
.trip-card__actions .acceptst {
  background: var(--yt-green-dark, #2e7d32) !important;
  border-color: var(--yt-green-dark, #2e7d32) !important;
  color: #fff !important;
}
/* Details -> outlined green (was btn-info blue) */
.trip-card__actions .btn-info {
  background: var(--yt-green-pale, #f3faf4) !important;
  border: 1px solid var(--yt-green-dark, #2e7d32) !important;
  color: var(--yt-green-dark, #2e7d32) !important;
}
/* Decline / Cancel -> solid red */
.trip-card__actions .btn-danger {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

/* Tablet and below: stack route above stats, chips into a wrapping row. */
@media (max-width: 767px) {
  .trip-card__head { align-items: stretch; flex-direction: column; padding: 16px; }
  .trip-card__chips { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .trip-card__body { flex-direction: column; gap: 16px; padding: 16px; }
  .trip-card__stats {
    border-left: 0;
    border-top: 1px solid #edf0ee;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
    padding-left: 0;
    padding-top: 16px;
    width: 100%;
  }
  .trip-card__stat { flex: 1 1 45%; }
  .trip-card__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
  .trip-card__actions { padding: 0 16px 16px; }
  .trip-card__when > i { font-size: 1.6rem; }
  .trip-card__date { font-size: .95rem; }
  .trip-card__time { font-size: 1.25rem; }
}

/* Phones: tighten padding and secondary text so more of the card fits on
   screen, while date/time and driver pay keep their emphasis. */
@media (max-width: 575px) {
  .trip-card { border-radius: 12px; margin-bottom: .75rem; }
  .trip-card__banner { font-size: .72rem; padding: 6px 10px; }

  .trip-card__head { gap: 12px; padding: 13px 14px; }
  .trip-card__when { gap: 11px; }
  .trip-card__when > i { font-size: 1.5rem; }
  .trip-card__date { font-size: .88rem; }
  .trip-card__time { font-size: 1.2rem; }
  .trip-card__chips { gap: 6px; }
  .trip-card__chip { font-size: .72rem; gap: 6px; padding: 5px 9px; }

  .trip-card__body { gap: 13px; padding: 13px 14px; }
  .trip-card__point { gap: 10px; grid-template-columns: 18px 1fr; padding-bottom: 12px; }
  .trip-card__point:not(:last-child)::before { left: 7px; top: 20px; }
  .trip-card__pin { font-size: 1.05rem; }
  .trip-card__label { font-size: .64rem; letter-spacing: .05em; margin-bottom: 1px; }
  .trip-card__place { font-size: .88rem; line-height: 1.3; }
  .trip-card__wait { font-size: .71rem; }

  /* Three compact columns instead of two rows of icon+text. */
  .trip-card__stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 13px;
  }
  .trip-card__stat { display: block; }
  .trip-card__stat > i { display: none; }
  .trip-card__stat-label { font-size: .62rem; letter-spacing: .04em; }
  .trip-card__stat-value { font-size: .88rem; }
  .trip-card__stat--pay .trip-card__stat-value { font-size: 1.05rem; }

  .trip-card__meta { gap: 11px 14px; padding: 13px 14px; }
  .trip-card__meta-label { font-size: .62rem; letter-spacing: .04em; margin-bottom: 1px; }
  .trip-card__meta-value { font-size: .82rem; line-height: 1.3; }

  .trip-card__actions { padding: 0 14px 14px; }
  .trip-card__actions table.btnssec tr,
  .trip-card__actions table.btnssecloafing tr { gap: 7px; }
  .trip-card__actions table.btnssec th,
  .trip-card__actions table.btnssecloafing th { flex: 1 1 96px; }
  .trip-card__actions .btn {
    font-size: .8rem !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
  }
}
