/* ============================================================
   Fleet System — design system (classic, clean, mobile-first)
   ============================================================ */
:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #eef2ff;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #4338ca 100%);
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e8eaf0;
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #151a33 55%, #1e1b4b 100%);
  --sidebar-text: #aab2c5;
  --page-bg: #f4f6fb;
  --card-radius: 16px;
  --card-shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.05);
  --card-shadow-hover: 0 8px 24px rgba(16,24,40,.10);
  --radius: 10px;

  --bs-primary: var(--brand);
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: var(--brand-dark);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
}

*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
html { max-width: 100%; overflow-x: hidden; }                /* no sideways scrolling, ever */
body { max-width: 100%; overflow-x: clip; }                  /* clip (not hidden) so the sticky top bar keeps working */
body {
  background: var(--page-bg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img, video, iframe, canvas, svg { max-width: 100%; }
pre { white-space: pre-wrap; word-break: break-word; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; font-weight: 700; color: #111827; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.text-muted { color: var(--muted) !important; }

/* ---------- Buttons: classic, tactile ---------- */
.btn {
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: .005em;
  padding: .5rem 1rem;
  transition: transform .08s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .35rem .75rem; border-radius: 8px; font-size: .84rem; }
.btn-lg { padding: .75rem 1.4rem; border-radius: 12px; }
.btn i { margin-right: .3rem; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand-dark);
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: #3730a3;
  --bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #312e81;
  --bs-btn-disabled-bg: #a5b4fc; --bs-btn-disabled-border-color: #a5b4fc;
  background-image: var(--brand-grad);
  border-color: var(--brand-dark);
  box-shadow: 0 1px 2px rgba(79,70,229,.35), 0 4px 10px rgba(79,70,229,.22);
}
.btn-primary:hover { box-shadow: 0 2px 4px rgba(79,70,229,.4), 0 8px 18px rgba(79,70,229,.28); background-image: linear-gradient(135deg, #4f46e5, #3730a3); }
.btn-success { box-shadow: 0 1px 2px rgba(25,135,84,.3), 0 4px 10px rgba(25,135,84,.18); }
.btn-warning { box-shadow: 0 1px 2px rgba(255,193,7,.4), 0 4px 10px rgba(255,193,7,.22); }
.btn-danger  { box-shadow: 0 1px 2px rgba(220,53,69,.3), 0 4px 10px rgba(220,53,69,.18); }
.btn-dark    { box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 10px rgba(0,0,0,.15); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: #c7d2fe; --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); background: #fff; }
.btn-outline-secondary { --bs-btn-color: #4b5563; --bs-btn-border-color: #d5d9e2; --bs-btn-hover-bg: #f3f4f6; --bs-btn-hover-color: #111827; --bs-btn-hover-border-color: #c3c9d6; background: #fff; }
.btn-outline-danger, .btn-outline-warning, .btn-outline-success { background: #fff; }
.btn-link { font-weight: 600; }
.btn-group .btn { box-shadow: none; }
/* .bg-primary / .text-primary follow --bs-primary-rgb (set above), so Bootstrap's own opacity helpers (bg-opacity-10 tiles, badges) keep working */

/* ---------- Forms ---------- */
.form-label { font-size: .82rem; font-weight: 600; color: #374151; margin-bottom: .3rem; }
.form-control, .form-select {
  border-radius: var(--radius); border: 1px solid #d6dbe6; padding: .55rem .8rem; background-color: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .35rem .6rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(79,70,229,.14); }
.form-control::placeholder { color: #a3aab8; }
.form-text { color: var(--muted); font-size: .78rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-group .form-control:not(:last-child), .input-group .form-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { box-shadow: none; }
input[type=file].form-control { padding: .4rem .6rem; }
hr { border-color: var(--line); opacity: 1; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--card-radius); background: #fff; }
.card-stat {
  border: 1px solid #edf0f6;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  background: #fff;
  transition: box-shadow .18s ease, transform .18s ease;
}
a .card-stat:hover, .card-stat.hoverable:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.card-stat h6 { font-weight: 700; color: #111827; }
.card-stat .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.icon-badge {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.page-title { font-weight: 800; letter-spacing: -.02em; font-size: 1.45rem; margin-bottom: 1rem; }
h4.mb-3, h4.mb-4 { font-weight: 800; letter-spacing: -.02em; }
.card details > summary { cursor: pointer; }

/* ---------- Tables ---------- */
.table { --bs-table-hover-bg: #f6f7ff; --bs-table-bg: transparent; color: var(--ink); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-bottom-color: #eef0f5; }
.table thead th, .table-light { background: #f8f9fc !important; color: #6b7280; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; border-bottom: 1px solid var(--line) !important; white-space: nowrap; }
.table tbody tr { transition: background-color .12s ease; }
.table-sm > :not(caption) > * > * { padding: .45rem .7rem; }
.table tfoot td { border-top: 2px solid var(--line); }
.table-responsive { border-radius: var(--card-radius); }
.card .table-responsive > .table { margin: 0; }
.card.card-stat > .table-responsive > .table > thead th:first-child, .card.card-stat > .table > thead th:first-child { padding-left: 1.1rem; }
.card.card-stat > .table-responsive > .table td:first-child, .card.card-stat > .table-responsive > .table th:first-child { padding-left: 1.1rem; }

/* ---------- Badges, alerts, nav ---------- */
.badge { border-radius: 999px; font-weight: 600; padding: .38em .7em; letter-spacing: .01em; }
.badge.bg-light { border: 1px solid var(--line); }
.alert { border-radius: 12px; border-width: 0 0 0 4px; border-left-style: solid; padding: .8rem 1rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.alert-success { background: #ecfdf3; border-color: #12b76a; color: #05603a; }
.alert-danger  { background: #fef3f2; border-color: #f04438; color: #912018; }
.alert-warning { background: #fffaeb; border-color: #f79009; color: #93370d; }
.alert-info    { background: #eff8ff; border-color: #2e90fa; color: #175cd3; }
.alert-light   { background: #fff; border-color: #d0d5dd; }
.nav-pills .nav-link { border-radius: 999px; color: #4b5563; font-weight: 600; font-size: .86rem; padding: .4rem .95rem; }
.nav-pills .nav-link.active { background: var(--brand-grad); color: #fff; box-shadow: 0 3px 10px rgba(79,70,229,.3); }
.nav-tabs { border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 2px; }
.nav-tabs .nav-link { border: 0; border-bottom: 3px solid transparent; color: #6b7280; font-weight: 600; font-size: .88rem; border-radius: 8px 8px 0 0; padding: .6rem .9rem; }
.nav-tabs .nav-link:hover { color: var(--brand); background: #f6f7ff; }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(16,24,40,.14); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .8rem; font-size: .9rem; }
.dropdown-item:hover { background: var(--brand-light); color: var(--brand-dark); }
.list-group-item { border-color: var(--line); }
.progress { border-radius: 999px; height: .55rem; }
.border { border-color: var(--line) !important; }

/* ---------- App shell: sidebar + topbar + content ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex-shrink: 0;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 1040;
  transition: transform .22s ease;
  box-shadow: 4px 0 24px rgba(15,23,42,.18);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
  display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; color: #fff; font-weight: 800; font-size: 1.02rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand:hover { color: #fff; }
.brand-tile { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-grad); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; box-shadow: 0 4px 12px rgba(79,70,229,.5); flex-shrink: 0; }
.brand-text { line-height: 1.15; }
.brand-text small { display: block; font-weight: 500; font-size: .72rem; color: #9ca3af; }
.sidebar-section { text-transform: uppercase; font-size: .66rem; letter-spacing: .09em; font-weight: 700; color: #6c7590; padding: 18px 22px 6px; }
.sidebar-nav { list-style: none; margin: 0; padding: 0 12px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 12px; color: var(--sidebar-text);
  padding: 9px 12px; border-radius: 10px; font-size: .9rem; font-weight: 500; margin-bottom: 2px;
  transition: background .14s ease, color .14s ease, transform .14s ease; position: relative;
}
.sidebar-nav .nav-link i { width: 20px; text-align: center; font-size: 1.05rem; opacity: .9; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.sidebar-nav .nav-link.active { background: var(--brand-grad); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(79,70,229,.38); }
.sidebar-nav .nav-link.active i { opacity: 1; }
.sidebar-foot { margin-top: auto; padding: 16px 22px 22px; border-top: 1px solid rgba(255,255,255,.07); }

.main-wrapper { flex: 1; margin-left: 264px; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.topbar {
  background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 1020;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
.topbar-title { font-weight: 700; color: #111827; display: none; }
.topbar .sidebar-toggle { display: none; border: none; background: #f3f4f8; width: 40px; height: 40px; border-radius: 12px; font-size: 1.35rem; color: #374151; align-items: center; justify-content: center; }
.user-chip { display: flex; align-items: center; gap: 10px; background: #f6f7fb; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; box-shadow: 0 2px 8px rgba(79,70,229,.35); }
.user-chip .dropdown-toggle::after { margin-left: 4px; color: #9ca3af; }
.page-content { padding: 24px; flex: 1; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- Mobile bottom bar ---------- */
.mobile-tabbar { display: none; }

/* ---------- Tablets & phones ---------- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: 288px; max-width: 86vw; }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .topbar .sidebar-toggle { display: inline-flex; }
  .topbar-title { display: block; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1035; backdrop-filter: blur(2px); }
  .sidebar-backdrop.show { display: block; }
  .page-content { padding: 16px; padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .mobile-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(16,24,40,.08);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-tabbar a, .mobile-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #6b7280; font-size: .68rem; font-weight: 600; padding: 6px 2px; border: 0; background: none; border-radius: 12px; text-decoration: none;
  }
  .mobile-tabbar i { font-size: 1.3rem; }
  .mobile-tabbar a.active { color: var(--brand); background: var(--brand-light); }
  body.menu-open .mobile-tabbar { display: none; }
}
@media (max-width: 767.98px) {
  .topbar { padding-left: 12px; padding-right: 12px; }
  .page-title, h4.mb-3, h4.mb-4 { font-size: 1.25rem; }
  .card-stat .value { font-size: 1.45rem; }
  .card-stat.p-4, .card.p-4 { padding: 1rem !important; }
  /* inputs at 16px stop iPhones zooming in; bigger touch targets */
  .form-control, .form-select { font-size: 16px; min-height: 44px; }
  .form-control-sm, .form-select-sm { font-size: 16px; min-height: 40px; }
  textarea.form-control { min-height: 0; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 38px; padding: .4rem .85rem; }
  /* page headers and button rows wrap instead of overflowing */
  .page-content .d-flex.justify-content-between, .page-content .d-flex.gap-2, .page-content .d-flex.gap-3 { flex-wrap: wrap; }
  .page-content .d-flex.justify-content-between > .d-flex { width: 100%; }
  .page-content .d-flex.justify-content-between > .d-flex > .btn, .page-content .d-flex.justify-content-between > .btn { flex: 1 1 auto; }
  .page-content form.d-flex, .page-content form.row { gap: 8px; }
  .page-content .d-flex > .form-control, .page-content .d-flex > .form-select, .page-content form .form-control[style*="max-width"], .page-content form .form-select[style*="max-width"] { max-width: 100% !important; width: 100% !important; flex: 1 1 100%; }
  .input-group { flex-wrap: nowrap; }
  .nav-tabs .nav-link { padding: .5rem .65rem; font-size: .82rem; }
  .nav-pills { flex-wrap: wrap; gap: 6px; }
  .modal-dialog { margin: .75rem; }
  .btn-group { flex-wrap: wrap; }
  [style*="min-width"] { min-width: 0 !important; }

  /* ---- tables become cards: every row a card, every cell "Heading — value" ---- */
  .table-responsive { overflow-x: visible; border-radius: 0; }
  table.rt-stack { display: block; }
  table.rt-stack thead { display: none; }
  table.rt-stack tbody, table.rt-stack tfoot { display: block; }
  table.rt-stack tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 12px; padding: 4px 14px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
  table.rt-stack td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; text-align: right; padding: 9px 0 !important; border: 0; border-bottom: 1px dashed #edeff4; word-break: break-word; overflow-wrap: anywhere; }
  table.rt-stack td:last-child { border-bottom: 0; }
  table.rt-stack td::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: #8a92a6; padding-top: 2px; }
  table.rt-stack td.no-label::before { display: none; }
  table.rt-stack td.no-label { justify-content: flex-end; }
  table.rt-stack td[colspan] { display: block; text-align: center; }
  table.rt-stack td[colspan]::before { display: none; }
  table.rt-stack td > .btn, table.rt-stack td > form { margin-left: auto; }
  table.rt-stack tfoot tr { background: #f8f9fc; }
  .card-stat > table.rt-stack, .card-stat > .table-responsive { padding: 12px; }
  .card > .table-responsive > table.rt-stack tr:last-child { margin-bottom: 0; }
  /* detail tables (label | value, label | value) read top to bottom */
  table.rt-kv, table.rt-kv tbody, table.rt-kv tr { display: block; width: 100%; }
  table.rt-kv tr { padding: 4px 0; border-bottom: 1px solid #f0f2f7; }
  table.rt-kv th { display: block; width: 100%; border: 0 !important; padding: 8px 0 0 !important; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #8a92a6; font-weight: 700; background: none !important; }
  table.rt-kv td { display: block; width: 100%; border: 0 !important; padding: 0 0 8px !important; overflow-wrap: anywhere; }
}

/* ---------- Login page (legacy) ---------- */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #111827 0%, #312e81 100%); padding: 20px; }
.login-card { max-width: 400px; width: 100%; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); border: none; }
.login-card .brand-mark { width: 56px; height: 56px; border-radius: 14px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 12px; }
.badge-status { text-transform: capitalize; }

/* ---------- SaaS-style sign-in pages ---------- */
.auth-body { background: #fff; }
.auth-shell { display: flex; min-height: 100vh; }
.auth-brand-panel {
  flex: 0 0 46%;
  background: radial-gradient(circle at 20% 15%, #6366f1 0%, #4338ca 38%, #1e1b4b 100%);
  color: #fff;
  padding: 44px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand-top { font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.auth-brand-top i { font-size: 1.5rem; }
.auth-brand-body h1 { font-size: 2.1rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 14px; color: #fff; }
.auth-brand-body p { color: rgba(255,255,255,0.78); font-size: 1.02rem; max-width: 460px; }
.auth-features { list-style: none; padding: 0; margin: 28px 0 0; }
.auth-features li { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: rgba(255,255,255,0.92); }
.auth-features i { color: #a5b4fc; font-size: 1.15rem; }
.auth-brand-foot { color: rgba(255,255,255,0.55); font-size: 0.82rem; }

.auth-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-form-wrap { width: 100%; max-width: 400px; }
.auth-mobile-brand { display: none; font-weight: 700; color: var(--brand); font-size: 1.1rem; margin-bottom: 28px; align-items: center; gap: 8px; }
.auth-heading { font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-sub { color: #6b7280; margin-bottom: 26px; }
.auth-form-wrap .form-label { font-size: 0.85rem; font-weight: 600; color: #374151; }
.auth-form-wrap .form-control { padding: 0.65rem 0.85rem; border-radius: 10px; }
.auth-form-wrap .input-group .form-control { border-radius: 10px 0 0 10px; }
.auth-form-wrap .input-group .btn { border-radius: 0 10px 10px 0; border-color: #dee2e6; color: #6b7280; }
.auth-form-wrap .btn-primary { padding: 0.7rem; border-radius: 10px; font-weight: 600; }
.auth-notice { background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; border-radius: 10px; padding: 12px 14px; font-size: 0.88rem; margin-bottom: 20px; }
.auth-links { text-align: center; font-size: 0.88rem; margin-top: 22px; }

@media (max-width: 991.98px) {
  .auth-brand-panel { display: none; }
  .auth-mobile-brand { display: flex; }
}

.auth-form-wrap.auth-form-wide { max-width: 640px; }
.auth-form-panel:has(.auth-form-wide) { align-items: flex-start; padding-top: 48px; }
.req-ok { color: #198754; } .req-warn { color: #b58105; } .req-bad { color: #dc3545; }

/* ---------- trips grid (spreadsheet-style list) ---------- */
.trip-grid-scroll { overflow: auto; max-height: 72vh; border-radius: var(--card-radius); }
table.trip-grid { min-width: 100%; width: max-content; font-size: .86rem; }
table.trip-grid th, table.trip-grid td { white-space: nowrap; min-width: 120px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
table.trip-grid thead tr.grid-head th { position: sticky; top: 0; z-index: 3; background: #f8f9fc; }
table.trip-grid thead tr.grid-filters th { position: sticky; top: 38px; z-index: 3; background: #eef0f6; padding: .35rem .5rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
table.trip-grid .sticky-col { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 105px; box-shadow: 1px 0 0 var(--line); }
table.trip-grid thead .sticky-col { z-index: 4; background: #f8f9fc; }
table.trip-grid thead tr.grid-filters .sticky-col { background: #eef0f6; }
table.trip-grid tbody tr:hover .sticky-col { background: #f6f7ff; }
table.trip-grid.grid-edit td[data-editable="1"] { padding: .25rem .35rem; background: #fffdf5; overflow: visible; }
table.trip-grid.grid-edit td.editing .form-control, table.trip-grid.grid-edit td.editing .form-select { min-width: 140px; }
table.trip-grid td.dirty { background: #fff3cd !important; box-shadow: inset 0 0 0 2px #ffc107; }
table.trip-grid td.saved { background: #d1e7dd !important; transition: background .4s; }
table.trip-grid td.err { background: #f8d7da !important; box-shadow: inset 0 0 0 2px #dc3545; }
table.trip-grid td.locked { color: #9ca3af; cursor: not-allowed; }
table.trip-grid td.locked::after { content: " \1F512"; font-size: .7rem; }
table.trip-grid .cell-msg { color: #b02a37; font-size: .72rem; white-space: normal; max-width: 220px; line-height: 1.2; margin-top: 2px; }
.save-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 1060; background: #1f2937; color: #fff; padding: .6rem 1rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.35); gap: .75rem; align-items: center; }
@media (max-width: 991.98px) { .save-bar { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
