/* ==========================================================================
   TransLink design system
   Group 34 | SLIIT | SE2030

   The look follows the Uber product language: near black and white, one
   typeface (Inter) at two weights, flat surfaces, small radii, thick confident
   type, and colour used only to mean something. Nothing decorative.
   Sections:
     1 tokens          6 nav + shells       11 seat map
     2 base type       7 bottom bar         12 ticket + QR
     3 surfaces        8 home + search      13 tables
     4 buttons         9 trips + lists      14 live map
     5 forms          10 dashboard          15 crew/counter/finance
                                            16 chat, install, footer, utils
   ========================================================================== */

/* ------------------------------------------------------------- 1. tokens */
:root {
  --ink:            #000000;   /* Uber black - primary surface and buttons */
  --ink-2:          #1F1F1F;
  --ink-3:          #545454;   /* secondary text */
  --ink-4:          #757575;   /* tertiary text */
  --line:           #E2E2E2;
  --line-soft:      #EEEEEE;
  --bg:             #FFFFFF;
  --bg-2:           #F6F6F6;   /* page background / muted fills */
  --bg-3:           #EEEEEE;

  --accent:         #276EF1;   /* links, focus, live things */
  --accent-soft:    #E8F0FE;
  --go:             #05944F;   /* confirmed, paid, on time */
  --go-soft:        #E4F5EC;
  --warn:           #C77700;   /* pending, delayed */
  --warn-soft:      #FDF2E2;
  --bad:            #E11900;   /* cancelled, failed, overdue */
  --bad-soft:       #FDEDEC;

  --r-sm: 6px;
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 999px;

  --shadow-1: 0 1px 2px rgba(0,0,0,.08);
  --shadow-2: 0 4px 16px rgba(0,0,0,.10);
  --shadow-3: 0 12px 40px rgba(0,0,0,.16);

  --ease: cubic-bezier(.2,0,.2,1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --nav-h: 64px;
  --tab-h: 60px;
}

/* ---------------------------------------------------------- 2. base type */
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;                 /* regular for everything ... */
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1 0 auto; width: 100%; }

h1, h2, h3, h4, h5, h6,
.fw-bold, strong, b, .tl-bold {
  font-weight: 500;                 /* ... medium, never heavy, for emphasis */
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1, .tl-display {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 500;
}

h2, .tl-headline {
  font-size: clamp(1.375rem, 3.4vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

.lead { font-size: clamp(1rem, 2.2vw, 1.25rem); color: var(--ink-3); font-weight: 400; }

.tl-label {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.tl-muted, .text-muted { color: var(--ink-3) !important; }
.small { font-size: .875rem; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink-3); }
a.btn, a.tl-quick, a.tl-tab, .tl-navbar a, .tl-bottom-nav a,
.tl-trip a, .list-group-item, .dropdown-item { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ----------------------------------------------------------- 3. surfaces */
.tl-card, .card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: none;
}
.card-body { padding: 1.25rem; }

.tl-pane {
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
}

.tl-tonal {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
}
.tl-tonal .tl-muted, .tl-tonal .small { color: rgba(255,255,255,.72) !important; }

.tl-hover { transition: transform .15s var(--ease), border-color .15s var(--ease); }
.tl-hover:hover { border-color: var(--ink); }

.tl-section { padding: 3rem 0; }
.tl-section.pt-0 { padding-top: 0; }
.tl-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}

hr, .dropdown-divider { border-color: var(--line); opacity: 1; }

/* ------------------------------------------------------------ 4. buttons */
.btn {
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border-radius: var(--r);
  border: 1px solid transparent;
  padding: .75rem 1.25rem;
  min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background .15s var(--ease), color .15s var(--ease),
              border-color .15s var(--ease), transform .08s var(--ease);
}
.btn:active { transform: scale(.985); }

.btn-primary, .btn-dark, .tl-btn-primary {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.btn-primary:hover, .btn-dark:hover, .tl-btn-primary:hover {
  background: var(--ink-2); border-color: var(--ink-2); color: #fff;
}

.btn-secondary, .btn-light {
  background: var(--bg-2); border-color: var(--bg-2); color: var(--ink);
}
.btn-secondary:hover, .btn-light:hover { background: var(--bg-3); border-color: var(--bg-3); color: var(--ink); }

.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark {
  background: transparent; border-color: var(--line); color: var(--ink);
}
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-dark:hover {
  background: var(--bg-2); border-color: var(--ink); color: var(--ink);
}

.btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* "warning" is the historic class on the search button - keep it black, Uber style */
.btn-warning, .tl-btn-accent {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.btn-warning:hover, .tl-btn-accent:hover { background: var(--ink-2); color: #fff; }

.btn-success { background: var(--go); border-color: var(--go); color: #fff; }
.btn-success:hover { background: #04803f; border-color: #04803f; color: #fff; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #c31500; border-color: #c31500; }

.btn-lg { padding: .95rem 1.6rem; font-size: 1.0625rem; min-height: 56px; }
.btn-sm { padding: .45rem .8rem; font-size: .875rem; min-height: 38px; border-radius: var(--r-sm); }
.btn-icon { width: 48px; padding: 0; }
.d-grid .btn { width: 100%; }

.tl-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--bg-2); color: var(--ink);
  border: 1px solid transparent; border-radius: var(--r-full);
  padding: .4rem .85rem; font-size: .875rem; font-weight: 500;
  white-space: nowrap;
}
.tl-chip-quiet { background: transparent; border-color: var(--line); font-weight: 400; }
a.tl-chip:hover { background: var(--bg-3); color: var(--ink); }
.tl-chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* -------------------------------------------------------------- 5. forms */
.form-label { font-size: .8125rem; font-weight: 500; color: var(--ink-3); margin-bottom: .35rem; }

.form-control, .form-select {
  font-family: inherit;
  font-size: 16px;                 /* stops iOS Safari zooming on focus */
  min-height: 52px;
  padding: .75rem .9rem;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.form-control::placeholder { color: var(--ink-4); }
.form-control:focus, .form-select:focus {
  background: var(--bg);
  border-color: var(--ink);
  box-shadow: none;
  color: var(--ink);
}
textarea.form-control { min-height: 120px; }
.form-check-input { width: 1.15rem; height: 1.15rem; border-color: var(--line); }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.input-group-text { background: var(--bg-2); border-color: transparent; }
.tl-field-error, .invalid-feedback { color: var(--bad); font-size: .8125rem; }

.alert {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: .9rem 1.1rem;
  font-size: .9375rem;
}
.alert-success { background: var(--go-soft); border-color: transparent; color: #04562f; }
.alert-danger  { background: var(--bad-soft); border-color: transparent; color: #8c1000; }
.alert-warning { background: var(--warn-soft); border-color: transparent; color: #7a4a00; }
.alert-info    { background: var(--accent-soft); border-color: transparent; color: #10429a; }

/* ------------------------------------------------------ 6. nav + shells */
.tl-navbar {
  position: sticky; top: 0; z-index: 1030;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
  min-height: var(--nav-h);
}
.tl-navbar .navbar-nav .nav-link {
  font-weight: 500; font-size: .9375rem; color: var(--ink);
  padding: .5rem .85rem; border-radius: var(--r);
}
.tl-navbar .navbar-nav .nav-link:hover { background: var(--bg-2); }
.tl-navbar .navbar-toggler { border: 0; padding: .25rem .5rem; }
.tl-navbar .navbar-toggler:focus { box-shadow: none; }

/* The uploaded logo already contains the TRANSLINK wordmark, so it stands alone. */
.tl-brand { display: inline-flex; align-items: center; }
.tl-brand-mark { height: 26px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.tl-worknav .tl-brand-mark { filter: invert(1) brightness(2); }

.dropdown-menu {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); padding: .4rem;
}
.dropdown-item { border-radius: var(--r-sm); padding: .6rem .75rem; font-size: .9375rem; }
.dropdown-item:hover { background: var(--bg-2); }

/* The worker apps wear the dark chrome so nobody confuses them with the
   passenger app while standing at a counter. */
.tl-worknav {
  position: sticky; top: 0; z-index: 1030;
  background: var(--ink); color: #fff;
  padding-top: var(--safe-top);
  border-bottom: 1px solid #2b2b2b;
}
.tl-worknav .nav-link, .tl-worknav a { color: rgba(255,255,255,.86); }
.tl-worknav .nav-link:hover, .tl-worknav a:hover { color: #fff; background: #1f1f1f; }
.tl-worknav .tl-app-name { font-weight: 500; letter-spacing: -.02em; }
.tl-worknav .tl-app-tag {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.6);
}

.tl-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 0 0 var(--r) 0;
}
.tl-skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------- 7. bottom bar */
.tl-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  display: flex; background: var(--bg);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
.tl-bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: var(--tab-h);
  font-size: .6875rem; font-weight: 500; color: var(--ink-4);
}
.tl-bottom-nav a i { font-size: 1.25rem; }
.tl-bottom-nav a.active { color: var(--ink); }
@media (min-width: 992px) { .tl-bottom-nav { display: none; } }
body:has(.tl-bottom-nav) { padding-bottom: calc(var(--tab-h) + var(--safe-bottom)); }
@media (min-width: 992px) { body:has(.tl-bottom-nav) { padding-bottom: 0; } }

/* ----------------------------------------------------- 8. home + search */
.tl-hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.tl-hero h1, .tl-hero .tl-display { color: #fff; }
.tl-hero .lead { color: rgba(255,255,255,.75); }
.tl-hero .tl-chip { background: rgba(255,255,255,.12); color: #fff; }
.tl-hero-mark {
  position: absolute; right: -60px; bottom: -70px;
  width: 340px; opacity: .07; pointer-events: none;
  filter: invert(1);
}

.tl-search-card {
  position: relative; z-index: 2;
  margin-top: -3.5rem; margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  padding: 1.25rem;
}
@media (max-width: 575.98px) { .tl-search-card { margin-top: -2.25rem; padding: 1rem; } }

.tl-steps { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767.98px) { .tl-steps { grid-template-columns: 1fr; } }
.tl-step {
  position: relative;
  background: var(--bg-2); border-radius: var(--r-lg); padding: 1.5rem 1.25rem;
}
.tl-step-no {
  position: absolute; top: 1rem; right: 1.25rem;
  font-size: 2.5rem; font-weight: 500; color: rgba(0,0,0,.08); line-height: 1;
}

.tl-feature {
  height: 100%; padding: 1.5rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .15s var(--ease);
}
.tl-feature:hover { border-color: var(--ink); }
.tl-feature-icon, .tl-stat-icon {
  width: 44px; height: 44px; border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; font-size: 1.25rem; margin-bottom: .9rem;
}
.tl-feature-icon.gold  { background: var(--warn); }
.tl-feature-icon.green { background: var(--go); }
.tl-stat-icon { margin-bottom: 0; }
.tl-stat-icon.gold { background: var(--warn); }
.tl-stat-icon.green { background: var(--go); }
.tl-stat-icon.red { background: var(--bad); }

/* ----------------------------------------------------- 9. trips + lists */
.tl-trip {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.tl-trip:first-of-type { border-top: 1px solid var(--line-soft); }
.tl-trip-time { font-size: 1.125rem; font-weight: 500; letter-spacing: -.02em; }
.tl-trip-line { flex: 0 0 32px; height: 1px; background: var(--line); display: inline-block; }
.tl-fare { font-size: 1.125rem; font-weight: 500; }

.tl-quick {
  display: flex; align-items: center; gap: .75rem;
  padding: .95rem 1rem;
  background: var(--bg-2); border-radius: var(--r-lg);
  color: var(--ink); font-weight: 500; font-size: .9375rem;
  transition: background .15s var(--ease);
}
.tl-quick:hover { background: var(--bg-3); color: var(--ink); }
.tl-quick i { font-size: 1.15rem; }
.tl-quick-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .tl-quick-grid { grid-template-columns: repeat(4, 1fr); } }

.tl-scroll {
  display: flex; gap: .75rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .5rem;
  scrollbar-width: none;
}
.tl-scroll::-webkit-scrollbar { display: none; }
.tl-scroll > * { scroll-snap-align: start; flex: 0 0 auto; }

.list-group-item { border-color: var(--line); padding: .9rem 1rem; }
.list-group-item-action:hover { background: var(--bg-2); }

.tl-empty {
  text-align: center; color: var(--ink-3);
  padding: 2.5rem 1.25rem; border-radius: var(--r-lg); background: var(--bg-2);
}
.tl-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--ink-4); }

/* -------------------------------------------------------- 10. dashboard */
.tl-greeting {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.tl-greeting h1, .tl-greeting h2, .tl-greeting h3 { color: #fff; }
.tl-greeting-mark {
  position: absolute; right: -30px; bottom: -40px; width: 190px;
  opacity: .08; filter: invert(1); pointer-events: none;
}
.tl-greeting .form-control { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.tl-greeting .form-control::placeholder { color: rgba(255,255,255,.6); }
.tl-greeting .form-control:focus { background: #fff; color: var(--ink); }

.tl-stat {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1rem 1.1rem; height: 100%;
}
.tl-stat-value { font-size: 1.5rem; font-weight: 500; letter-spacing: -.03em; }
.tl-stat-label { font-size: .8125rem; color: var(--ink-4); }

.tl-next-trip { border: 1px solid var(--ink); }

.tl-status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 500; letter-spacing: .01em;
  padding: .3rem .65rem; border-radius: var(--r-full);
  background: var(--bg-3); color: var(--ink-2);
}
.tl-status-ok   { background: var(--go-soft);   color: #04562f; }
.tl-status-warn { background: var(--warn-soft); color: #7a4a00; }
.tl-status-bad  { background: var(--bad-soft);  color: #8c1000; }
.tl-status-info { background: var(--accent-soft); color: #10429a; }
.badge { font-weight: 500; border-radius: var(--r-full); padding: .35rem .6rem; }
.badge.bg-secondary { background: var(--bg-3) !important; color: var(--ink-2) !important; }
.badge.bg-light { background: var(--bg-2) !important; color: var(--ink) !important; }

/* --------------------------------------------------------- 11. seat map */
.tl-deck {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 1.25rem; background: var(--bg);
  max-width: 420px; margin-inline: auto;
}
.tl-driver-seat {
  display: flex; justify-content: flex-end; align-items: center; gap: .5rem;
  color: var(--ink-4); font-size: .8125rem;
  padding-bottom: .85rem; margin-bottom: .85rem;
  border-bottom: 1px dashed var(--line);
}
.tl-seat-row { display: flex; justify-content: center; gap: .5rem; margin-bottom: .5rem; }
.tl-aisle { width: 26px; }
.tl-seat, .tl-seat-btn {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  transition: transform .12s var(--ease), background .12s var(--ease), border-color .12s var(--ease);
}
.tl-seat.available:hover, .tl-seat-btn:hover { border-color: var(--ink); }
.tl-seat.selected, .tl-seat-btn.selected {
  background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px);
}
.tl-seat.booked, .tl-seat-btn:disabled, .tl-seat.booked:hover {
  background: var(--bg-3); border-color: var(--bg-3);
  color: var(--ink-4); cursor: not-allowed; transform: none;
}
.tl-legend { display: flex; gap: 1rem; justify-content: center; font-size: .8125rem; color: var(--ink-3); }
.tl-legend span::before {
  content: ''; display: inline-block; width: 14px; height: 14px;
  border-radius: 4px; margin-right: .35rem; vertical-align: -2px; border: 1px solid var(--line);
}
.tl-legend .lg-free::before { background: #fff; }
.tl-legend .lg-sel::before  { background: var(--ink); border-color: var(--ink); }
.tl-legend .lg-book::before { background: var(--bg-3); border-color: var(--bg-3); }

/* ------------------------------------------------------ 12. ticket + QR */
.tl-ticket {
  position: relative;
  border: 1px solid var(--ink); border-radius: var(--r-xl);
  background: var(--bg); padding: 1.5rem;
  max-width: 520px; margin-inline: auto;
}
.tl-ticket::before, .tl-ticket::after {
  content: ''; position: absolute; width: 24px; height: 24px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 50%; top: 50%; transform: translateY(-50%);
}
.tl-ticket::before { left: -13px; }
.tl-ticket::after  { right: -13px; }
.tl-ticket-split { border-top: 1px dashed var(--line); margin: 1.25rem 0; }
.tl-code {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.25rem; letter-spacing: .18em; font-weight: 500;
}
.tl-qr {
  display: block; width: 180px; height: 180px; margin-inline: auto;
  border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: #fff;
}
.tl-qr-lg { width: 240px; height: 240px; }

/* --------------------------------------------------------- 13. tables */
.tl-table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.table { margin: 0; color: var(--ink); }
.table > thead th {
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  font-size: .75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-4); padding: .75rem 1rem;
}
.table > tbody td { padding: .9rem 1rem; border-color: var(--line-soft); vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background: var(--bg-2); }
.table-light, .table-striped > tbody > tr:nth-of-type(odd) > * { background: var(--bg-2); }

@media (max-width: 767.98px) {
  .tl-stack-table thead { display: none; }
  .tl-stack-table, .tl-stack-table tbody, .tl-stack-table tr, .tl-stack-table td { display: block; width: 100%; }
  .tl-stack-table tr {
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: .5rem .25rem; margin-bottom: .75rem;
  }
  .tl-stack-table td { border: 0; padding: .35rem 1rem; display: flex; justify-content: space-between; gap: 1rem; }
  .tl-stack-table td::before {
    content: attr(data-label); font-size: .75rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--ink-4); font-weight: 500;
  }
  .tl-table-wrap { border: 0; }
}

/* -------------------------------------------------------- 14. live map */
.tl-map, #tl-map {
  height: 420px; width: 100%;
  border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; z-index: 1;
}
.tl-map-full, #tl-live-map { height: min(70vh, 620px); }
.tl-live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--go); margin-right: .4rem;
  animation: tl-pulse 1.6s infinite;
}
@keyframes tl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(5,148,79,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(5,148,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(5,148,79,0); }
}
.tl-bus-pin {
  background: var(--ink); color: #fff;
  border-radius: var(--r-full); padding: .2rem .55rem;
  font-size: .75rem; font-weight: 500; white-space: nowrap;
  border: 2px solid #fff; box-shadow: var(--shadow-2);
}
.tl-live-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: .9rem 1rem; margin-bottom: .6rem;
}
.tl-progress { height: 4px; background: var(--bg-3); border-radius: var(--r-full); overflow: hidden; }
.tl-progress > span { display: block; height: 100%; background: var(--ink); }

/* ----------------------------------------- 15. crew, counter and finance */
.tl-workshell { min-height: 100vh; background: var(--bg-2); }
.tl-workshell main { padding-bottom: 2rem; }
.tl-work-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.25rem;
}
.tl-tabs {
  display: flex; gap: .5rem; overflow-x: auto; width: 100%; max-width: 100vw;
  padding: .75rem 1rem; scrollbar-width: none; background: var(--bg-2);
}
.tl-tabs::-webkit-scrollbar { display: none; }
.tl-tab {
  padding: .55rem 1rem; border-radius: var(--r-full);
  background: var(--bg); border: 1px solid var(--line);
  font-size: .875rem; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.tl-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

#tl-reader {
  width: 100%; max-width: 420px; margin-inline: auto;
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
}
.tl-scan-result { border-radius: var(--r-lg); padding: 1.1rem; font-weight: 500; }
.tl-scan-ok  { background: var(--go-soft);  color: #04562f; }
.tl-scan-bad { background: var(--bad-soft); color: #8c1000; }

.tl-money { font-variant-numeric: tabular-nums; font-weight: 500; }
.tl-payslip { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; }

.tl-linkpass {
  min-height: 300px; padding: clamp(1.5rem, 5vw, 2.5rem); border-radius: var(--r-xl);
  color: #fff; background: linear-gradient(135deg, #050505, #202b3d 62%, #276ef1);
  box-shadow: var(--shadow-3); position: relative; overflow: hidden;
}
.tl-linkpass::after {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  right: -70px; top: -80px; border: 36px solid rgba(255,255,255,.08);
}

/* ------------------------- 16. chat, install, footer, print, utilities */
.tl-chat-toggle, #tl-chat-toggle {
  position: fixed; right: 1rem; z-index: 1050;
  bottom: calc(1rem + var(--safe-bottom) + var(--tab-h));
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); color: #fff; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; box-shadow: var(--shadow-2);
}
@media (min-width: 992px) { .tl-chat-toggle, #tl-chat-toggle { bottom: 1.25rem; } }

.tl-chat-panel, #tl-chat-panel {
  position: fixed; right: 1rem; z-index: 1051;
  bottom: calc(4.75rem + var(--safe-bottom) + var(--tab-h));
  width: min(360px, calc(100vw - 2rem)); max-height: 70vh;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden;
}
@media (min-width: 992px) { .tl-chat-panel, #tl-chat-panel { bottom: 5rem; } }
.tl-chat-header { background: var(--ink); color: #fff; padding: .85rem 1rem; font-weight: 500; }
.tl-chat-body, #tl-chat-body { flex: 1; overflow-y: auto; padding: 1rem; background: var(--bg-2); }
.tl-chat-input { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); }
.tl-bot-msg, .tl-user-msg {
  max-width: 85%; padding: .6rem .85rem; border-radius: var(--r-lg);
  margin-bottom: .5rem; font-size: .9375rem; white-space: pre-wrap;
}
.tl-bot-msg { background: var(--bg); border: 1px solid var(--line); }
.tl-user-msg { background: var(--ink); color: #fff; margin-left: auto; }

.tl-install-bar {
  position: fixed; left: 1rem; right: 1rem; z-index: 1060;
  bottom: calc(.75rem + var(--safe-bottom) + var(--tab-h));
  display: flex; align-items: center; gap: .75rem;
  background: var(--ink); color: #fff;
  border-radius: var(--r-lg); padding: .75rem 1rem; box-shadow: var(--shadow-3);
}
.tl-install-bar img { width: 32px; height: 32px; border-radius: var(--r-sm); }
.tl-install-text { flex: 1; font-size: .875rem; line-height: 1.3; }
@media (min-width: 992px) {
  .tl-install-bar { left: auto; right: 1.25rem; bottom: 1.25rem; max-width: 380px; }
}

.tl-footer {
  background: var(--ink); color: rgba(255,255,255,.7);
  padding: 3rem 0 2rem; margin-top: auto;
  font-size: .875rem;
}

@media (max-width: 991.98px) {
  body:has(.tl-bottom-nav) .tl-footer { display: none; }
}
.tl-footer a { color: rgba(255,255,255,.7); }
.tl-footer a:hover { color: #fff; }
.tl-foot-mark { height: 24px; filter: invert(1) brightness(2); margin-bottom: 1rem; }

/* Installed on a phone the footer is dead weight - the tab bar is the navigation. */
@media (display-mode: standalone) {
  .tl-footer { display: none; }
  .tl-only-browser { display: none !important; }
  .tl-hero { padding-top: 2rem; }
}

.tl-offline-page { display: grid; place-items: center; min-height: 100vh; text-align: center; padding: 2rem; }

@media print {
  .tl-navbar, .tl-worknav, .tl-bottom-nav, .tl-footer, .d-print-none,
  #tl-chat-toggle, #tl-chat-panel, .tl-install-bar { display: none !important; }
  body { padding: 0; }
  .tl-ticket { border: 1px solid #000; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
