/* Liquid Glass — the CRM dressed the way iOS 26 dresses its apps (owner, 16.11.2026).
   Loaded after app.css and only overrides it. The rule Apple follows, and so do we:
   glass is for the layer that floats above the content — sidebar, top bar, tab bar,
   buttons, chips, sheets. The content itself (lists, tables, forms) sits on milky
   white panels so black text stays readable on the coloured wallpaper. */

:root {
  --glass:        rgba(255,255,255,.18);
  --glass-strong: rgba(255,255,255,.62);
  --panel:        rgba(255,255,255,.80);
  --panel-solid:  rgba(255,255,255,.92);
  --hairline:     rgba(0,0,0,.10);
  --rim:
    inset 1.5px 1.5px 0 rgba(255,255,255,.85),
    inset -1px -1px 0 rgba(255,255,255,.35),
    inset 0 0 16px rgba(255,255,255,.28);
  --lift: 0 10px 30px -12px rgba(20,30,60,.35);
  --blur: blur(14px) saturate(190%) brightness(1.05);
  --radius: 22px;
  --radius-sm: 14px;
  --bg: transparent;
  --surface: rgba(255,255,255,.86);
  --surface-2: rgba(255,255,255,.55);
  --line: rgba(0,0,0,.10);
  --line-soft: rgba(0,0,0,.07);
  --sidebar-w: 248px;
  --tabbar-h: 66px;
}

/* ------------------------------------------------------------- wallpaper */
/* #DCE6FF is the one colour of the top edge: theme-color (the status bar of the
   installed app), the page background Safari tints its bar with, and the strip
   the wallpaper fades into at the top. If they differ, an iPhone shows a band
   over the notch (owner, iPhone 11, 16.11.2026). */
html { background: #DCE6FF; }
body { background: transparent; }  /* a painted body would cover the wallpaper (z-index -1) */
.wall {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, #DCE6FF 0, #DCE6FF var(--sat, 0px), rgba(220,230,255,0) calc(var(--sat, 0px) + 110px)),
    radial-gradient(55% 45% at 8% 8%, rgba(79,139,255,.85) 0%, transparent 70%),
    radial-gradient(50% 40% at 98% 18%, rgba(255,122,89,.75) 0%, transparent 70%),
    radial-gradient(55% 45% at 85% 92%, rgba(163,91,255,.70) 0%, transparent 70%),
    radial-gradient(50% 40% at 2% 85%, rgba(32,208,176,.70) 0%, transparent 70%),
    linear-gradient(180deg, #DCE6FF 0%, #F4EAFF 100%);
}

/* ------------------------------------------------------------- the glass */
/* .lg = clear glass with a lit rim. Used for everything that floats. */
.lg, .sidebar, .topbar, .tabbar, .chip, .btn:not(.btn--primary):not(.btn--danger):not(.btn--brand),
.icon-btn, .switcher, .wh-filters .chips, .modal, .search__results, .picker__list, .toast {
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
/* Real refraction (the edge "lens") only where the browser can do it: Chromium.
   Safari keeps the blur and the rim, which is most of the look. */
.lg-refract .topbar, .lg-refract .tabbar, .lg-refract .topbar .icon-btn {
  -webkit-backdrop-filter: url(#lg-refract) blur(8px) saturate(190%) brightness(1.05);
  backdrop-filter: url(#lg-refract) blur(8px) saturate(190%) brightness(1.05);
}

/* ------------------------------------------------------------------ shell */
.app { gap: 0; }
.sidebar {
  margin: 12px 0 12px 12px; height: calc(100vh - 24px); top: 12px; border-radius: 28px;
  background: var(--glass-strong); color: var(--ink); box-shadow: var(--rim), var(--lift);
}
.sidebar__brand, .sidebar__brand a { color: var(--ink); }
.sidebar__close { color: var(--ink-2); }
.nav__item { color: var(--ink); font-weight: 560; border-radius: 999px; padding: 9px 12px; }
.nav__item svg { opacity: 1; }
.nav__item:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.nav__item.is-active { background: rgba(255,255,255,.92); color: #0A60FF; box-shadow: 0 2px 10px -2px rgba(20,30,60,.2), inset 0 1px 0 #fff; }
.nav__group { color: var(--muted); }
.sidebar__foot { border-top: 1px solid var(--hairline); }
.who__meta strong { color: var(--ink); }
.who__meta small { color: var(--muted); }
.sidebar .btn--ghost { color: var(--ink); }
.sidebar .btn--ghost:hover { background: rgba(255,255,255,.6); }
.switcher { background: rgba(255,255,255,.35); border-radius: 999px; padding: 4px; box-shadow: var(--rim); }
.switcher button { color: var(--ink); border-radius: 999px; font-weight: 650; }
.switcher button.is-on { background: rgba(255,255,255,.95); color: #0A60FF; box-shadow: 0 2px 8px -2px rgba(20,30,60,.25); }

.topbar {
  margin: 12px 12px 0; border-radius: 999px; border: 0; padding: 8px 10px 8px 14px;
  background: var(--glass); box-shadow: var(--rim), var(--lift); top: 12px;
}
.search input { background: rgba(255,255,255,.7); border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.search__results { background: var(--panel-solid); border: 0; border-radius: 20px; box-shadow: var(--rim), var(--shadow-lg); }

.view { padding-top: 18px; }

/* -------------------------------------------------------------- headings */
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.page-head .sub { color: var(--ink-2); }

/* --------------------------------------------------------------- buttons */
.btn { border-radius: 999px; padding: 9px 16px; font-weight: 620; border: 0; }
.btn:not(.btn--primary):not(.btn--danger):not(.btn--brand) {
  background: rgba(255,255,255,.6); color: var(--ink); box-shadow: var(--rim), 0 4px 12px -6px rgba(20,30,60,.25);
}
.btn:not(.btn--primary):not(.btn--danger):not(.btn--brand):hover { background: rgba(255,255,255,.85); }
.btn--primary { background: #0A0C10; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px -8px rgba(0,0,0,.6); }
.btn--danger { background: rgba(255,255,255,.75); color: var(--red); box-shadow: inset 0 0 0 1px rgba(200,50,43,.25); }
.btn--sm { padding: 6px 12px; }
.icon-btn { border: 0; border-radius: 50%; width: 38px; height: 38px; background: rgba(255,255,255,.55); box-shadow: var(--rim); color: var(--ink); }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--panel); border: 0; border-radius: var(--radius);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 24px -14px rgba(20,30,60,.35);
}
.card__head { border-bottom: 1px solid var(--hairline); padding: 14px 18px; }
.card__head h2, .card__head h3 { font-size: 15px; font-weight: 700; }
.card--alert { box-shadow: 0 0 0 2px rgba(200,50,43,.35), 0 8px 24px -14px rgba(20,30,60,.35); }
.kpi__label { color: var(--ink-2); }

table.data th { background: rgba(255,255,255,.5); color: var(--ink-2); border-bottom: 1px solid var(--hairline); }
table.data td { border-bottom: 1px solid var(--line-soft); }
table.data tbody tr.clickable:hover { background: rgba(10,96,255,.06); }

/* ----------------------------------------------------------- inputs, chips */
.field input, .field select, .field textarea, .filters input, .filters select, .picker input, .sms__text {
  border: 0; border-radius: 14px; background: rgba(255,255,255,.85);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), inset 0 1px 2px rgba(0,0,0,.04);
}
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .picker input:focus {
  outline: none; box-shadow: inset 0 0 0 2px #0A60FF;
}
.chip { border: 0; background: rgba(255,255,255,.55); color: var(--ink); font-weight: 650; box-shadow: var(--rim); }
.chip.is-on { background: #0A0C10; color: #fff; box-shadow: 0 4px 12px -6px rgba(0,0,0,.6); }
.picker__list { background: var(--panel-solid); border: 0; border-radius: 18px; box-shadow: var(--rim), var(--shadow-lg); }
.pill { font-weight: 680; }

.chooser__card { background: var(--glass-strong); border: 0; border-radius: 28px; box-shadow: var(--rim), var(--lift);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.chooser__card p { color: var(--ink-2); }

/* -------------------------------------------------------- sign-in screen */
.auth { background: none; }
.auth__panel { background: var(--glass-strong); border: 0; border-radius: 32px; box-shadow: var(--rim), var(--lift);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.boot { background: transparent; }

/* ---------------------------------------------------------------- sheets */
.modal-backdrop { background: rgba(10,14,24,.18); -webkit-backdrop-filter: none; backdrop-filter: none; }
.modal {
  background: rgba(255,255,255,.72); border-radius: 32px; box-shadow: var(--rim), 0 30px 70px -20px rgba(10,20,50,.45);
  -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
}
.modal__head { border-bottom: 0; padding: 18px 20px 6px; }
.modal__head h2 { font-size: 19px; font-weight: 750; letter-spacing: -.015em; }
.modal__foot { border-top: 0; }
.modal__error { border-radius: 14px; }

/* ---------------------------------------------------------------- toasts */
.toast { border-radius: 999px; padding: 11px 18px; font-weight: 600; background: rgba(10,12,16,.82); }
.toast--ok { background: rgba(18,133,95,.88); }
.toast--error { background: rgba(200,50,43,.9); }

/* --------------------------------------------------------- phone tab bar */
.tabbar { display: none; }
@media (max-width: 900px) {
  .sidebar { margin: 0; top: 0; height: 100vh; border-radius: 0 28px 28px 0; width: 280px; background: rgba(255,255,255,.78); }
  .topbar { margin: 10px 10px 0; top: calc(10px + env(safe-area-inset-top)); }
  .topbar .icon-btn { width: 40px; height: 40px; }
  .view { padding-bottom: calc(var(--tabbar-h) + 46px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 30px; }

  .tabbar {
    position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    display: flex; gap: 2px; padding: 5px; border-radius: 999px; height: var(--tabbar-h);
    background: var(--glass); box-shadow: var(--rim), var(--lift);
  }
  .app.is-chooser .tabbar, .app[hidden] .tabbar { display: none; }
  .tabbar__item {
    flex: 1; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 2px;
    border: 0; background: none; border-radius: 999px; color: var(--ink); text-decoration: none;
    font: inherit; font-size: 10.5px; font-weight: 650; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .tabbar__item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .tabbar__item svg { width: 22px; height: 22px; }
  .tabbar__item:hover { text-decoration: none; }
  .tabbar__item.is-active { background: rgba(255,255,255,.85); color: #0A60FF; box-shadow: inset 0 1px 0 #fff, 0 2px 10px -2px rgba(20,30,60,.25); }

  /* A page with a round "+" (Warehouse) makes room for it next to the tab bar. */
  body:has(.fab) .tabbar { right: calc(24px + var(--tabbar-h)); }
  .fab {
    position: fixed; z-index: 51; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    width: var(--tabbar-h); height: var(--tabbar-h); border-radius: 50%; border: 0; padding: 0;
    display: grid; place-items: center; font-size: 32px; font-weight: 300; line-height: 1; color: #fff; cursor: pointer;
    background: rgba(10,96,255,.85); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    box-shadow: inset 1.5px 1.5px 0 rgba(255,255,255,.6), inset 0 0 14px rgba(255,255,255,.25), 0 10px 24px -8px rgba(10,96,255,.7);
  }
  .fab-wide { display: none !important; }

  .toasts { bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom)); }

  /* Dialogs become iOS sheets: from the bottom, inset from the edges. */
  .modal-backdrop { place-items: end center; padding: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .modal { border-radius: 36px; max-height: calc(100vh - 40px - env(safe-area-inset-top)); animation: sheet .26s cubic-bezier(.2,.9,.25,1); }
  .modal::before { content: ""; width: 38px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.22); margin: 9px auto 0; flex: none; }
}
@media (min-width: 901px) { .fab { display: none; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }

/* ------------------------------------------------------- warehouse list */
/* iOS "inset grouped" list: one milky block per place, hairlines between rows. */
.wh-cars { display: grid; gap: 12px; align-content: start; }
.wh-cars .wh-filters { padding: 0; display: grid; gap: 10px; }
.wh-find { border: 0; border-radius: 999px; background: rgba(255,255,255,.75); padding: 13px 18px;
  box-shadow: var(--rim), 0 6px 16px -10px rgba(20,30,60,.35); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.wh-find:focus { outline: none; box-shadow: inset 0 0 0 2px #0A60FF; }
.wh-filters .chips {
  flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: 4px; border-radius: 999px; scrollbar-width: none;
  background: rgba(255,255,255,.3); box-shadow: var(--rim), var(--lift);
}
.wh-filters .chips::-webkit-scrollbar { display: none; }
.wh-filters .chip { flex: none; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 8px 13px; }
.wh-filters .chip.is-on { background: rgba(255,255,255,.95); color: #0A60FF; box-shadow: 0 2px 10px -2px rgba(20,30,60,.3), inset 0 1px 0 #fff; }

.wh-groups { padding: 0; gap: 4px; }
.wh-group__head { padding: 12px 16px 7px; font-size: 13px; letter-spacing: .02em; text-transform: none; font-weight: 750; }
.wh-group__count { background: rgba(255,255,255,.6); }
.wh-grid {
  display: block; border-radius: 24px; overflow: hidden; background: var(--panel);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 24px -14px rgba(20,30,60,.35);
}
.wh-item {
  width: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
  padding: 12px 16px 12px 20px; gap: 4px;
}
.wh-item + .wh-item::after { content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--hairline); }
.wh-item::before { inset: 14px auto 14px 8px; width: 4px; border-radius: 4px; }
.wh-item:hover { background: rgba(255,255,255,.6); box-shadow: none; border: 0; }
.wh-item:active { transform: none; background: rgba(0,0,0,.04); }
.wh-item__name { font-size: 17px; font-weight: 640; }
.wh-item__vin { border-radius: 9px; }
.wh-group--picked_up .wh-item { background: none; opacity: .75; }

.wh-act { border: 0; border-radius: 999px; background: rgba(255,255,255,.62); box-shadow: var(--rim), 0 6px 16px -10px rgba(20,30,60,.4); }
.wh-act:hover { border: 0; background: rgba(255,255,255,.85); }
.seg__opt span { border: 0; border-radius: 999px; background: rgba(255,255,255,.62); box-shadow: var(--rim), 0 4px 12px -8px rgba(20,30,60,.4); }
.seg__opt input:checked + span { background: #0A0C10; box-shadow: 0 4px 12px -6px rgba(0,0,0,.6); }
.wh-save { border-radius: 999px; min-height: 58px; font-size: 17px; }
.wh-now { border: 0; border-radius: 20px; background: rgba(255,255,255,.55); box-shadow: var(--rim); }
.wh-hint { border-radius: 14px; }
.wh-vin, .wh-year { border-radius: 16px !important; }
.wh-field > input { border: 0; border-radius: 14px; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.wh-field > input:focus { outline: none; box-shadow: inset 0 0 0 2px #0A60FF; }
.wh-log { border-top: 1px solid var(--hairline); }
.wh-tag { background: rgba(0,0,0,.06); }
.wh-tag--warn { background: var(--amber-soft); }
.wh-bar { background: rgba(0,0,0,.08); }

/* With nothing but the menu button in it (Warehouse: no global search), the top
   bar dissolves and leaves one round glass button, like iOS. */
.topbar:has(.search[hidden]):has(#quick-rental[hidden]) { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; margin-bottom: -6px; }
.topbar:has(.search[hidden]):has(#quick-rental[hidden]) .topbar__menu { width: 46px; height: 46px; box-shadow: var(--rim), var(--lift); }
@media (min-width: 901px) { .topbar:has(.search[hidden]):has(#quick-rental[hidden]) { display: none; } }

/* .btn--primary above would paint every Save black — keep the colour that says
   which move is being saved. */
.wh-save--dropped_off { background: rgba(18,133,95,.92); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 20px -8px rgba(18,133,95,.7); }
.wh-save--picked_up { background: rgba(37,99,235,.92); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 20px -8px rgba(37,99,235,.7); }
.wh-save--on_road { background: rgba(109,63,209,.92); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 20px -8px rgba(109,63,209,.7); }
/* The menu button only opens the drawer on a phone; on a wide screen the sidebar is always there. */
@media (min-width: 901px) { .topbar .topbar__menu { display: none; } }

/* Sign-up with an invite code */
.auth__switch { display: block; text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.auth__switch strong { color: #0A60FF; }
.auth__switch:hover { text-decoration: none; }
.auth__code { font-family: var(--mono); font-size: 26px !important; font-weight: 700; letter-spacing: .35em; text-align: center; }
.auth__code::placeholder { color: #C5CBD4; }
.invite-code { font-family: var(--mono); font-size: 20px; font-weight: 750; letter-spacing: .18em; }

/* ------------------------------------------- iPhone notch / Dynamic Island */
/* viewport-fit=cover lets the page run under the status bar and the home bar
   (Safari on iOS 26 always does). Everything that sits at an edge keeps clear
   of the notch/Dynamic Island on top, the rounded corners when the phone is
   turned sideways and the home indicator at the bottom. On a desktop all the
   insets are 0, so none of this changes anything there. */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}
.main { padding-top: var(--sat); }
.auth {
  padding: calc(24px + var(--sat)) calc(16px + var(--sar)) calc(24px + var(--sab)) calc(16px + var(--sal));
}
@media (max-width: 900px) {
  /* The bar rests under the island and stays under it while the page scrolls. */
  .topbar { margin: 10px calc(10px + var(--sar)) 0 calc(10px + var(--sal)); top: calc(10px + var(--sat)); }
  /* The drawer spans the visible screen (not 100vh, which on iOS runs under the
     Safari toolbar) and its first row starts below the status bar. */
  .sidebar {
    height: auto; top: 0; bottom: 0; width: calc(280px + var(--sal));
    padding-top: var(--sat); padding-left: var(--sal);
  }
  .tabbar { left: calc(12px + var(--sal)); right: calc(12px + var(--sar)); }
  body:has(.fab) .tabbar { right: calc(24px + var(--sar) + var(--tabbar-h)); }
  .fab { right: calc(12px + var(--sar)); }
  .toasts { left: calc(14px + var(--sal)); right: calc(14px + var(--sar)); }
  /* A sheet never grows past the status bar. */
  .modal { max-height: calc(100dvh - 28px - var(--sat) - var(--sab)); }
  .modal-backdrop { padding-left: calc(8px + var(--sal)); padding-right: calc(8px + var(--sar)); }
}
/* iOS "scroll edge effect": what scrolls up under the clock and the island goes
   soft and pale instead of colliding with the status bar. Zero tall off iPhone. */
.app::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--sat); z-index: 45; pointer-events: none;
  background: linear-gradient(180deg, rgba(220,230,255,.92), rgba(220,230,255,.6));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent);
}

/* ---------------------------------------------------------- Rent → Messages */
.msg-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.msg-tpl {
  display: grid; gap: 4px; align-content: start; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border: 0; border-radius: 18px; padding: 12px 14px; background: rgba(255,255,255,.6); box-shadow: var(--rim), 0 4px 12px -8px rgba(20,30,60,.35);
  -webkit-tap-highlight-color: transparent; transition: background .12s, box-shadow .12s;
}
.msg-tpl strong { font-size: 14px; font-weight: 700; }
.msg-tpl span { font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg-tpl:hover { background: rgba(255,255,255,.85); }
.msg-tpl.is-on { background: #fff; box-shadow: inset 0 0 0 2px #0A60FF, 0 8px 20px -10px rgba(10,96,255,.6); }
.msg-tpl.is-on strong { color: #0A60FF; }
.msg-tpl--add { background: rgba(255,255,255,.3); box-shadow: inset 0 0 0 1.5px rgba(10,96,255,.35); }
.msg-tpl--add strong { color: #0A60FF; }
.msg-text { font-size: 16px; min-height: 112px; line-height: 1.45; }
.msg-card .field { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.msg-fields__wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.msg-fields { display: flex; gap: 6px; flex-wrap: wrap; }
.msg-field { padding: 5px 11px; font-size: 12.5px; }
.msg-count.is-long { color: var(--amber); }
.msg-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-tools:empty { display: none; }
.msg-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.msg-filters::-webkit-scrollbar { display: none; }
.msg-filters .chip { flex: none; }
.msg-find { width: 100%; font: inherit; font-size: 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.8); padding: 12px 18px;
  box-shadow: var(--rim), 0 6px 16px -10px rgba(20,30,60,.35); }
.msg-find:focus { outline: none; box-shadow: inset 0 0 0 2px #0A60FF; }
.msg-select { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-list { border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px var(--hairline); }
.msg-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; }
.msg-row + .msg-row { border-top: 1px solid var(--hairline); }
.msg-row.is-on { background: rgba(10,96,255,.06); }
.msg-row.is-off { opacity: .62; }
.msg-row__pick { display: flex; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.msg-row.is-off .msg-row__pick { cursor: default; }
.msg-row__pick input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: #0A60FF; }
.msg-row__who { display: grid; gap: 4px; min-width: 0; }
.msg-row__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15.5px; font-weight: 680; }
.msg-row__sub { font-size: 12.5px; color: var(--ink-2); }
.msg-row__text {
  display: block; font-size: 13px; line-height: 1.4; color: var(--ink); background: rgba(10,96,255,.08);
  border-radius: 14px 14px 14px 4px; padding: 7px 11px; max-width: 560px;
}
/* The clamp sits on an inner span: on the padded bubble itself it shows a sliver of a 4th line. */
.msg-row__text > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-row__skip { font-size: 12.5px; color: var(--red); }
.msg-row__send { flex: none; align-self: center; }
.msg-bar {
  position: sticky; bottom: 16px; z-index: 40; margin-top: 14px; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 20px; border-radius: 999px; background: rgba(255,255,255,.72); box-shadow: var(--rim), var(--lift);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.msg-bar__count { font-weight: 700; }
.msg-bar__send { margin-left: auto; min-height: 46px; padding: 0 22px; font-size: 15.5px; background: #0A60FF; }
.msg-note { background: var(--amber-soft); color: var(--ink); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.msg-problems { display: grid; gap: 6px; padding-left: 18px; }
@media (max-width: 900px) {
  .msg-tpls { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; }
  .msg-tpls::-webkit-scrollbar { display: none; }
  .msg-tpl { flex: 0 0 74%; scroll-snap-align: start; }
  .msg-fields__wrap { flex-wrap: nowrap; }
  .msg-fields { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; }
  .msg-fields::-webkit-scrollbar { display: none; }
  .msg-field { flex: none; }
  /* Send rides in the top-right corner so the preview bubble gets the full width. */
  .msg-row { position: relative; }
  .msg-row__name { padding-right: 70px; }
  .msg-row__send { position: absolute; top: 9px; right: 12px; }
  .msg-bar { bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom)); }
}
