/* Strativa Access dashboard - black and white, wide type like the wordmark */

:root {
  --ink: #000000;
  --panel: #0E0F11;
  --line: #24262B;
  --paper: #F5F5F3;
  --muted: #8C9097;
  --ok: #2BD49A;
  --warn: #F5C451;
  --stop: #FF5468;
  --radius: 10px;
  --wide: 125;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

/* ---------- Brand header + navigation ---------- */

.brandbar {
  display: flex;
  justify-content: center;
  padding: 34px 24px 26px;
  position: relative;
  z-index: 1;
}

.logo {
  height: 104px;
  width: auto;
  display: block;
}

.navbar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  z-index: 5;
}

.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.tabs { display: flex; gap: 4px; }

.tab {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.tab:hover { color: var(--paper); }

.tab.is-active {
  color: var(--ink);
  background: var(--paper);
}

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

/* The Strativa S, faint, anchored to the bottom-right of the window */
.watermark {
  position: fixed;
  right: -60px;
  bottom: -90px;
  width: min(40vw, 520px);
  aspect-ratio: 1075 / 1463;
  background: url("s-mark.png") no-repeat center / contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Layout ---------- */

main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.display {
  margin: 0;
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-stretch: 125%;
  font-variation-settings: "wdth" var(--wide);
}

.count {
  font-weight: 300;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.summary {
  color: var(--muted);
  margin: 14px 0 28px;
  max-width: 70ch;
}

.lede { color: var(--muted); margin: 12px 0 28px; }
.small { color: var(--muted); font-size: 13px; }

/* ---------- Buttons ---------- */

.btn {
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  border: 1px solid var(--paper);
}

.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: #FFFFFF; }
.btn-primary:disabled { opacity: 0.5; cursor: wait; }

.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--paper); }

.btn-small { padding: 6px 14px; font-size: 13px; }

.link {
  background: none;
  border: 0;
  color: var(--paper);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.chip {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}

.chip.is-active { color: var(--ink); background: var(--paper); border-color: var(--paper); }

.filters { display: flex; gap: 8px; }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tr.detail td {
  background: var(--panel);
  padding: 14px 18px 18px;
}

.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

/* Sortable column headings */
.sort {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort:hover { color: var(--paper); }
.sort::after { content: ""; width: 10px; text-align: center; }
th[aria-sort="ascending"] .sort,
th[aria-sort="descending"] .sort { color: var(--paper); }
th[aria-sort="ascending"] .sort::after { content: "\25B4"; }
th[aria-sort="descending"] .sort::after { content: "\25BE"; }

/* Search + filters row */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search {
  flex: 1 1 260px;
  max-width: 380px;
  font: inherit;
  font-size: 14px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
}

.search:focus { border-color: var(--paper); outline: none; }
.search::placeholder { color: var(--muted); }

.primary-text { font-weight: 700; }
.secondary-text { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 13px; letter-spacing: 0.02em; }

.actions { text-align: right; white-space: nowrap; }
.actions .btn + .btn { margin-left: 8px; }

/* Status: dot + word, so meaning never depends on colour alone */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.stop { color: var(--stop); }
.status.idle { color: var(--muted); }

.empty {
  color: var(--muted);
  padding: 48px 0;
  text-align: center;
}

.tests { margin: 0; padding: 0; list-style: none; }
.tests li { padding: 4px 0; color: var(--muted); font-size: 13px; }

/* ---------- Sign in ---------- */

.signin {
  max-width: 520px;
  margin: 12vh auto 0;
}

.uidbox {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0 24px;
  word-break: break-all;
}

.error { color: var(--stop); font-size: 14px; }

/* ---------- Dialogs ---------- */

dialog {
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  width: min(480px, 92vw);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.7); }

dialog h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" var(--wide);
}

dialog label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}

dialog input, dialog select {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-size: 15px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

dialog input:focus, dialog select:focus { border-color: var(--paper); outline: none; }
dialog select { cursor: pointer; }
dialog label[hidden] { display: none; }

.hint { display: block; font-weight: 400; margin-top: 6px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  max-width: 90vw;
  z-index: 20;
}

.toast.is-error { background: var(--stop); color: var(--ink); }

/* ---------- Small screens: rows become stacked blocks ---------- */

@media (max-width: 760px) {
  .brandbar { padding: 22px 18px 16px; }
  .logo { height: 64px; }
  .navbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 18px; }
  .account { margin-left: 0; width: 100%; justify-content: space-between; }
  .watermark { width: 70vw; opacity: 0.05; }
  main { padding: 28px 18px 60px; }

  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 12px 0; }
  .table td { border: 0; padding: 4px 0; text-align: left; }
  .table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    width: 120px;
    color: var(--muted);
    font-size: 12px;
  }
  .num, .actions { text-align: left; }
  .actions { padding-top: 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Sign-in forms ---------- */

.stack { display: grid; gap: 14px; max-width: 380px; }

.stack label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.stack input {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

.stack input:focus { border-color: var(--paper); outline: none; }

.row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.staff {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---------- Client views ---------- */

.welcome { margin-bottom: 30px; }

.welcome-line {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.company-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  font-stretch: 125%;
  font-variation-settings: "wdth" var(--wide);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 10px;
}

.section-title {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  font-stretch: 125%;
  font-variation-settings: "wdth" var(--wide);
}

.banner {
  border: 1px solid var(--stop);
  color: var(--stop);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-weight: 600;
}

.btn.danger { color: var(--stop); border-color: rgba(255, 84, 104, 0.4); }
.btn.danger:hover { border-color: var(--stop); }

.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.actions .btn + .btn { margin-left: 0; }
td.actions { display: table-cell; }
td.actions .btn { margin: 0 0 6px 6px; }

#recaptcha { position: fixed; bottom: 0; right: 0; }

/* ---------- History: locks on the left, one lock's history on the right ---------- */

.history-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}

.lock-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--ink);
}

.lock-list .search { max-width: none; flex: 0 0 auto; }

.lock-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.lock-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}

.lock-item:hover { background: var(--panel); }

.lock-item.is-active {
  background: var(--paper);
  color: var(--ink);
}

.lock-item.is-active .secondary-text { color: #44474D; }

.history-head { margin-bottom: 18px; }

.history-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" var(--wide);
}

.range {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.range label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.range input {
  display: block;
  margin-top: 4px;
  font: inherit;
  font-size: 14px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color-scheme: dark;
}

.range input:focus { border-color: var(--paper); outline: none; }

#historyFilters { margin-bottom: 16px; }

@media (max-width: 860px) {
  .history-layout { grid-template-columns: 1fr; }
  .lock-list { position: static; max-height: 280px; }
}

/* Phone inputs with a fixed +27 in front */
.phone-field {
  display: flex;
  align-items: stretch;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  overflow: hidden;
}

.phone-field:focus-within { border-color: var(--paper); }

.phone-field .prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--paper);
  font-weight: 700;
  border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.stack .phone-field input,
dialog .phone-field input {
  margin: 0;
  border: 0;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}

.stack .phone-field input:focus,
dialog .phone-field input:focus { outline: none; }

.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  max-width: 460px;
}

.notice p { margin: 0 0 10px; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 380px;
  margin: 34px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}


/* ---------- Renters dialog ---------- */

.renters { list-style: none; margin: 16px 0; padding: 0; }

.renter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.renter-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

#renterAddForm label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 10px 0;
}

.form-title { margin: 18px 0 4px; font-weight: 700; }

/* ---------- Geofencing ---------- */

.geo-zones-head { margin-top: 48px; }
.geo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.geo-search { margin: 16px 0 10px; }
.geo-search gmp-place-autocomplete { width: 100%; color-scheme: light; }
.geo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.geo-map-layout { display: grid; grid-template-columns: 1fr 360px; gap: 14px; }
.geo-zones {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  max-height: 460px;
  overflow-y: auto;
}
.geo-zones-title { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.geo-zones ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.geo-zones li { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); }
.geo-zones li .zone-name { grid-column: 1 / -1; width: 100%; box-sizing: border-box; }
.geo-zones li.is-active { border-color: var(--warn); }
.geo-zones .zone-name { max-width: none; min-width: 0; padding: 8px 10px; font-size: 14px; }
.geo-map {
  height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.geo-hint { margin: 10px 0 0; }
.geo-actions { margin-top: 14px; align-items: center; gap: 12px; }
.geo-tag { color: var(--ok); font-size: 12px; margin-left: 6px; }
.geo-alert-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 1200px) {
  .geo-map-layout { grid-template-columns: 1fr; }
  .geo-zones { max-height: none; }
}
@media (max-width: 760px) {
  .geo-map { height: 340px; }
  .geo-head { flex-direction: column; }
}

.geo-side { gap: 8px; }
.geo-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.geo-select { max-width: none; width: 100%; cursor: pointer; }
.geo-copy { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); min-height: 0; }
.geo-copy-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.copy-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.copy-item:hover { background: var(--panel); }
.copy-item input { margin-top: 3px; accent-color: var(--ok); }
.copy-item > span { display: flex; flex-direction: column; }

/* Lock settings that restrict opening: shown in red when on */
.btn.is-on { color: var(--stop); border-color: var(--stop); }

.nowrap { white-space: nowrap; }
.renter-line { line-height: 1.5; }


/* ---------- Locks page: one lock's settings and renters ---------- */

.manage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 28px; }
.manage-section { border-top: 1px solid var(--line); padding-top: 8px; max-width: 720px; }
.manage-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#manageLockStatus { margin-top: 8px; }
.manage-pane #renterAddForm { max-width: 420px; }
.manage-pane input {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-size: 15px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.manage-pane input:focus { border-color: var(--paper); outline: none; }
.manage-pane .phone-field input { margin: 0; border: 0; border-radius: 0; flex: 1; min-width: 0; }
.manage-pane .phone-field input:focus { outline: none; }
.unit-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.unit-link:hover .primary-text { text-decoration: underline; }
.btn.btn-stolen { background: var(--stop); border-color: var(--stop); color: #fff; font-weight: 700; }
.btn.btn-stolen:hover { filter: brightness(1.1); }

/* ---------- Phones: everything fits the screen width ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 760px) {
  /* Tabs: one row that scrolls sideways on its own, not the whole page */
  .tabs { width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding-left: 8px; padding-right: 8px; font-size: 13.5px; }
  .tabs { gap: 0; }

  /* Filter chips wrap onto a second line */
  .filters { flex-wrap: wrap; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .search { max-width: none; width: 100%; flex: 0 0 auto; }

  /* Lock cards: the unit name is the card title, no "Unit" label */
  .table td[data-label="Unit"]::before { display: none; }
  .table td[data-label="Unit"] { padding-bottom: 8px; }
  .unit-link { width: 100%; }

  /* Locks page: renter buttons go under the renter's name */
  .renter-row { flex-direction: column; align-items: stretch; }
  .renter-actions { justify-content: flex-start; }
  .manage-section-head { flex-wrap: wrap; }
  .history-head .history-title { word-break: break-word; }

  /* Dialogs fit the screen */
  dialog { max-width: calc(100vw - 24px); }
}

/* ---------- Client name between the logo and the tabs ---------- */
.client-header { border-top: 1px solid var(--line); position: relative; z-index: 1; }
.client-header-inner { max-width: 1180px; margin: 0 auto; padding: 20px 32px 30px; }
.client-header .welcome-line { text-align: left; }
.client-header .company-title { text-align: center; }
@media (max-width: 760px) {
  .client-header-inner { padding: 16px 18px 24px; }
}

/* Strativa: a lock's history in a wide dialog */
dialog.wide-dialog { width: min(960px, 94vw); max-height: 86vh; overflow-y: auto; }

/* ---------- Lock groups (trailer, locker, ...) ---------- */
.group-row td { background: var(--panel); border-top: 1px solid var(--line); padding: 10px 14px !important; }
.group-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.group-toggle { background: none; border: 0; color: var(--paper); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 0; text-align: left; }
.group-toggle .caret { display: inline-block; width: 12px; color: var(--muted); }
.group-flags { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; }
.lock-list .group-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 12px 6px; color: var(--paper); font: inherit; font-weight: 800; cursor: pointer; border-radius: 0; }
.lock-list .group-item:hover { background: var(--panel); }
.lock-list .group-item.is-active { background: var(--paper); color: var(--ink); border-radius: 8px; }
.lock-list .group-item .secondary-text { font-weight: 400; }
.lock-list .in-group .lock-item { padding-left: 22px; }
.lock-list .group-head { display: flex; align-items: stretch; border-top: 1px solid var(--line); margin-top: 6px; }
.lock-list .group-head .group-item { border-top: 0; margin-top: 0; flex: 1; }
.lock-list .group-caret { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 10px 4px 6px 10px; width: 30px; text-align: left; }
.lock-list .group-caret:hover { color: var(--paper); }
.eyebrow-label { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.manage-pane #groupAddForm { max-width: 420px; }
@media (max-width: 760px) {
  .group-row td::before { display: none !important; }
}

/* ---------- Strativa: Home settings box, clickable client rows, Manage clients facts */
.settings-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 0 0 18px; }
.settings-box .summary { margin: 6px 0; }
.click-row { cursor: pointer; }
.click-row:hover td { background: var(--panel); }
.facts { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 8px 20px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; word-break: break-word; }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

/* ---------- Geofencing: drop-down on top, full-width map, alerts per lock */
.geo-top { display: grid; gap: 6px; max-width: 520px; margin: 0 0 18px; }
.geo-top .small { margin: 2px 0 0; color: var(--stop); }
.geo-below { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.geo-below .geo-copy { margin-top: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); max-height: 460px; }
.geo-below .geo-copy ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.geo-lock-alerts { border: 1px solid var(--stop); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.geo-lock-alerts .geo-alerts-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.geo-alert { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.geo-alert:first-of-type { border-top: 0; }
.geo-alert .geo-alert-actions { justify-content: flex-start; }
.geo-flag { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; margin-top: 4px; display: inline-block; }
@media (max-width: 900px) { .geo-below { grid-template-columns: 1fr; } }

/* History: lock / group drop-down on top, events use the full width */
.history-layout.history-full { grid-template-columns: 1fr; }

/* Geofencing: Choose group + Lock to edit side by side */
.geo-top.geo-top-two { grid-template-columns: 1fr 1fr; max-width: 900px; column-gap: 14px; }
.geo-top-two .geo-pick { display: grid; gap: 6px; min-width: 0; }
.geo-top-two #geoAttention { grid-column: 1 / -1; }
@media (max-width: 640px) { .geo-top.geo-top-two { grid-template-columns: 1fr; } }

/* Manage clients: the client's groups */
.client-groups { margin-top: 28px; max-width: 640px; }
.client-groups form.row { display: flex; gap: 8px; margin-top: 10px; }
.client-groups form.row input { flex: 1; min-width: 0; }
.client-groups li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- Look and feel: dark grey blocks (Oct 2026) ---------- */
:root {
  --grey-1: #15171B;   /* boxes on the black page */
  --grey-2: #1F2227;   /* tab bar, stands out a little more */
  --grey-3: #2A2E35;   /* group pills */
}

/* Welcome a little larger; client name smaller, still above the page titles */
.welcome-line { font-size: 20px; }
.company-title { font-size: clamp(30px, 3.8vw, 42px); }

/* Tab bar a little lighter so it stands out */
.navbar { background: var(--grey-2); border-color: #30343B; }
.tab:hover { background: rgba(255, 255, 255, 0.06); }

/* Lock list box on the left */
.lock-list { background: var(--grey-1); }
.lock-item:hover { background: var(--grey-2); }

/* Each lock group as a rounded dark grey pill */
.lock-list .group-head {
  border-top: 0;
  margin-top: 8px;
  background: var(--grey-3);
  border-radius: 999px;
  align-items: center;
}
.lock-list .group-head .group-item { padding: 8px 14px 8px 2px; border-radius: 999px; }
.lock-list .group-head .group-item:hover { background: transparent; }
.lock-list .group-head:hover { background: #343841; }
.lock-list .group-caret { padding: 8px 4px 8px 14px; }
.lock-list .group-head .group-item.is-active { background: var(--paper); color: var(--ink); }

/* "Users" heading on a lock */
.users-title {
  font-size: 18px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- Dark grey cards on every client tab ---------- */
.detail-card {
  background: var(--grey-1);
  border: 1px solid #23262C;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.detail-card .history-head { margin-bottom: 12px; }
.detail-card .manage-actions { margin-bottom: 0; }
.detail-card .range { margin-bottom: 12px; }
.detail-card #historyFilters { margin-bottom: 0; }
.history-head.geo-head.detail-card { margin-bottom: 16px; }

/* Each user (and each person on a group) in its own pill */
.renters .renter-row {
  background: var(--grey-1);
  border: 1px solid #23262C;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.manage-section { border-top: 0; }

/* Tables (Home, History, Managers, Strativa tabs) on a dark grey card */
.table-wrap {
  background: var(--grey-1);
  border: 1px solid #23262C;
  border-radius: 16px;
  padding: 6px 10px;
}
.group-row td { background: var(--grey-2); }

/* Geofencing: pickers, zones and copy list on cards */
.geo-top { background: var(--grey-1); border: 1px solid #23262C; border-radius: 16px; padding: 14px 18px; }
.geo-zones, .geo-copy { background: var(--grey-1); border: 1px solid #23262C; border-radius: 16px; padding: 14px 16px; }

/* Fixes: search box in "Also apply" was stretching tall; lock card and user pills same width */
.geo-copy .search { flex: 0 0 auto; max-width: none; }
.manage-pane .manage-section { max-width: none; }

/* ================= Polish pass (Oct 2026) ================= */

/* Header: logo stays full size, moved left; welcome + client name beside it */
.brandbar { display: block; padding: 28px 32px 24px; }
.brandbar-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 48px;
}
.brandbar-inner:has(.client-header:not([hidden])) { justify-content: space-between; }
.brandbar .client-header { border: 0; text-align: right; }
.brandbar .client-header .welcome-line { text-align: right; margin-bottom: 8px; }
.brandbar .client-header .company-title { text-align: right; }
@media (max-width: 760px) {
  .brandbar { padding: 22px 18px 18px; }
  .brandbar-inner { flex-direction: column; gap: 18px; }
  .brandbar .client-header, .brandbar .client-header .welcome-line,
  .brandbar .client-header .company-title { text-align: center; }
}

/* Home: summary tiles */
.stat-tiles {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px; margin: 6px 0 22px;
}
.stat-tile {
  background: var(--grey-1); border: 1px solid #23262C; border-radius: 16px;
  padding: 16px 18px; position: relative; overflow: hidden;
}
.stat-tile::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  border-radius: 0 3px 3px 0; background: #3A3E46;
}
.stat-tile.is-ok::before { background: var(--ok); }
.stat-tile.is-warn::before { background: var(--warn); }
.stat-tile.is-stop::before { background: var(--stop); }
.stat-label { color: #A3A7AE; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value {
  font-size: 34px; font-weight: 800; line-height: 1.1; margin-top: 6px;
  font-stretch: 125%; font-variation-settings: "wdth" var(--wide);
}
.stat-tile.is-stop .stat-value { color: var(--stop); }
.stat-sub { color: #A3A7AE; font-size: 12px; margin-top: 4px; }
@media (max-width: 900px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Status as tinted badges */
.status {
  gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
  background: rgba(140, 144, 151, 0.14);
}
.status::before { width: 6px; height: 6px; }
.status.ok { background: rgba(43, 212, 154, 0.13); }
.status.warn { background: rgba(245, 196, 81, 0.14); }
.status.stop { background: rgba(255, 84, 104, 0.14); }

/* Settings that are switched on show green */
.btn.is-on { color: var(--ok); border-color: rgba(43, 212, 154, 0.55); background: rgba(43, 212, 154, 0.08); }

/* Battery: mini bar */
.batt { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.batt-body {
  position: relative; width: 26px; height: 12px; border: 1.5px solid currentColor;
  border-radius: 3px; padding: 1px; opacity: 0.9;
}
.batt-body::after {
  content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px;
  background: currentColor; border-radius: 0 1px 1px 0;
}
.batt-fill { display: block; height: 100%; background: currentColor; border-radius: 1px; }
.batt.ok { color: var(--ok); } .batt.warn { color: var(--warn); } .batt.stop { color: var(--stop); }
.batt-pct { color: var(--paper); }

/* Quieter watermark; slightly brighter secondary text */
.watermark { opacity: 0.035; }
:root { --muted: #9A9EA5; }

/* Tiles are buttons: click to filter the table */
.stat-tile { display: block; width: 100%; text-align: left; color: var(--paper); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.stat-tile:hover { border-color: #3A3E46; background: #1A1D22; }
.stat-tile.is-picked { border-color: var(--paper); }
td.actions { white-space: nowrap; }
.geo-actions .geo-tools, .geo-below + .geo-tools { margin: 18px 0 0; }

/* Restricted access */
.sched-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.sched-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.sched-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.sched-days { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.sched-days label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.check-line { display: flex !important; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 14px; }
.lock-alerts { margin-top: 14px; display: grid; gap: 10px; }
.lock-alerts .geo-alert { border: 1px solid rgba(255, 84, 104, 0.45); border-radius: 12px; padding: 10px 12px; }

/* ---- Sign-in legal links ---- */
.legal-links { margin-top:24px; text-align:center; color:var(--muted); line-height:1.7; }
.legal-links a { color:inherit; text-decoration:underline; }
.legal-links a:hover { color:#fff; }

/* ---- Past clients / delete client / CSV export ---- */
.past-title { margin:22px 0 8px; color:var(--muted); }
#pclientList .lock-item { opacity:.75; }
#pclientList .lock-item.is-active, #pclientList .lock-item:hover { opacity:1; }
#view-history .history-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.btn.btn-primary.danger { background:var(--stop); border-color:var(--stop); color:#fff; }
.btn.btn-primary.danger:disabled { opacity:.45; }

/* Sign-in: sit just under the logo (the old 12vh gap predates the big logo) */
.signin { margin: 16px auto 0; }

/* ---- Geofencing: client sites + circle zones ---- */
.sites-card { margin-bottom: 18px; }
.sites-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sites-actions { flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.sites-show { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.sites-note { margin: 10px 0 14px; border: 1px solid var(--warn); border-radius: 10px; padding: 12px 14px; }
.sites-preview { max-height: 46vh; overflow: auto; }
.site-flag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--warn); color: var(--warn); white-space: nowrap; }
.site-ok { color: var(--muted); font-size: 12px; }
.site-fix { display: flex; gap: 6px; align-items: center; }
.site-fix input { min-width: 210px; padding: 6px 8px; }
.geo-zones li .zone-radius { display: flex; gap: 6px; align-items: center; grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.geo-zones li .zone-radius input { width: 90px; padding: 6px 8px; }
.sites-list-tools { gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; }
.sites-list-tools .search { flex: 1 1 260px; max-width: none; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { margin: 0; }

/* Zone buttons + Save sit directly under the map, above the Stops / zones list */
.geo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 12px 0 4px; }
.geo-controls .geo-tools { margin: 0; }
.geo-controls .geo-actions { margin: 0; }

/* Map and other plain links: readable on the dark background */
a:not(.btn):not([class*="tab"]) { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
a:not(.btn):not([class*="tab"]):visited { color: var(--paper); }
a:not(.btn):not([class*="tab"]):hover { color: #FFFFFF; text-decoration-thickness: 2px; }

/* Shared groups (Managers & sharing tab) */
.share-head { margin-top: 36px; }
.share-pick { margin-top: 14px; }
.share-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share-pick-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; margin-top: 8px; }
.share-pick-list .check-line { margin: 6px 0; }
.share-pick-list .check-line .secondary-text { margin-left: auto; }
.share-pick-list .pick-sub { font-size: 12px; color: var(--muted); margin: 10px 0 2px; text-transform: uppercase; letter-spacing: 1px; }


/* ---------- Sign-in page: soft card, floating orbs, running field border (Nov 2026) ---------- */
@property --sa-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --sa-accent: #4FC3F7;          /* running border + button glow (white #F5F5F3 for pure black & white) */
  --sa-card: #15171B;
  --sa-field: #0F1114;
}

#view-signin .signin {
  position: relative;
  max-width: 460px;
  margin: 16px auto 0;
  padding: 36px 36px 28px;
  border-radius: 26px;
  background: var(--sa-card);
  box-shadow: 16px 16px 36px #000, -10px -10px 28px rgba(255, 255, 255, 0.045);
  text-align: center;
  animation: sa-in 0.5s ease both;
}

#view-signin .sa-badge {
  width: 58px; height: 58px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--sa-accent);
  background: var(--sa-card);
  box-shadow: 6px 6px 14px #000, -5px -5px 12px rgba(255, 255, 255, 0.05);
}

#view-signin .lede { margin: 10px 0 24px; }
#view-signin .stack { max-width: none; text-align: left; }
#view-signin .divider { max-width: none; }
#view-signin .row { justify-content: space-between; }
#view-signin .staff { justify-content: center; margin-top: 30px; }
#view-signin .notice { max-width: none; text-align: left; }

/* Fields sit pressed into the card */
#view-signin .stack label > input,
#view-signin .phone-field {
  background: var(--sa-field);
  border: 1.5px solid transparent;
  border-radius: 12px;
  box-shadow: inset 4px 4px 8px #050607, inset -3px -3px 7px rgba(255, 255, 255, 0.035);
  transition: box-shadow 0.25s;
}
#view-signin .phone-field input { background: transparent; }
#view-signin .phone-field .prefix { border-right-color: #262A31; }

/* The stripe that runs clockwise around the field you're typing in */
#view-signin .stack label > input:focus,
#view-signin .phone-field:focus-within {
  border-color: transparent;
  background:
    linear-gradient(var(--sa-field), var(--sa-field)) padding-box,
    conic-gradient(from var(--sa-angle),
      transparent 0 62%, color-mix(in srgb, var(--sa-accent) 35%, transparent) 80%,
      var(--sa-accent) 97%, #FFFFFF 100%) border-box;
  box-shadow: inset 4px 4px 8px #050607, 0 0 16px color-mix(in srgb, var(--sa-accent) 22%, transparent);
  animation: sa-spin 1.6s linear infinite;
}
@keyframes sa-spin { to { --sa-angle: 360deg; } }

/* Buttons lift, glow on hover and press in when clicked */
#view-signin .btn {
  width: 100%;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s;
  box-shadow: 6px 6px 14px #000, -4px -4px 10px rgba(255, 255, 255, 0.04);
}
#view-signin .row .btn { width: auto; }
#view-signin .btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 22px color-mix(in srgb, var(--sa-accent) 40%, transparent), 6px 6px 14px #000;
}
#view-signin .btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.45);
}

/* Switching between PIN / SMS code / email: the new form slides up */
#view-signin form:not([hidden]),
#view-signin .notice:not([hidden]) { animation: sa-in 0.35s ease both; }
@keyframes sa-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  #view-signin .signin { padding: 28px 20px 22px; border-radius: 20px; }
}

/* Geofencing: site list mode note (Nov 2026) */
.geo-sitemode{margin:14px 0 0;padding:14px 16px;border-radius:12px;border:1px solid #2c4558;background:#111a22;color:#c9d6e2;font-size:14px;line-height:1.55}
.link-btn{background:none;border:0;padding:0;color:#6FA8FF;text-decoration:underline;font:inherit;cursor:pointer}

/* ================= Header layout (Nov 2026) =================
   Client dashboard: welcome + client name LEFT, client's logo in the MIDDLE
   (only when the client has one), Strativa Access logo RIGHT.
   Sign-in and Strativa admin: Strativa logo alone, centred. */
.brandbar-inner:has(.client-header:not([hidden])) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.brandbar-inner:has(.client-header:not([hidden])) .client-header { grid-column: 1; justify-self: start; }
.brandbar-inner:has(.client-header:not([hidden])) .client-logo-slot { grid-column: 2; justify-self: center; }
.brandbar-inner:has(.client-header:not([hidden])) .logo { grid-column: 3; justify-self: end; height: 84px; }
.brandbar .client-header,
.brandbar .client-header .welcome-line,
.brandbar .client-header .company-title { text-align: left; }
.client-logo-slot { display: flex; align-items: center; justify-content: center; }
.client-logo { max-height: 84px; max-width: 260px; width: auto; height: auto; object-fit: contain; display: block; }
@media (max-width: 760px) {
  .brandbar-inner:has(.client-header:not([hidden])) {
    grid-template-columns: 1fr auto;
    gap: 14px 18px;
  }
  .brandbar-inner:has(.client-header:not([hidden])) .client-header { grid-column: 1; grid-row: 1; }
  .brandbar-inner:has(.client-header:not([hidden])) .logo { grid-column: 2; grid-row: 1; height: 52px; }
  .brandbar-inner:has(.client-header:not([hidden])) .client-logo-slot { grid-column: 1 / -1; grid-row: 2; }
  .client-logo { max-height: 56px; }
  .brandbar .client-header,
  .brandbar .client-header .welcome-line,
  .brandbar .client-header .company-title { text-align: left; }
}

/* ================= Phone layout (Nov 2026) =================
   Less clutter on a phone: a compact header, tabs in one swipeable row that
   stays at the top, and the account links behind a menu button. */
.account-menu-btn { display: none; }
@media (max-width: 760px) {
  .brandbar { padding: 14px 18px 12px; }
  .brandbar-inner:has(.client-header:not([hidden])) { gap: 8px 14px; }
  .brandbar .client-header .welcome-line { font-size: 12px; margin: 0 0 2px; letter-spacing: 0.02em; }
  .brandbar .client-header .company-title { font-size: 24px; line-height: 1.1; padding-bottom: 4px; border-bottom-width: 3px; }
  .brandbar-inner:has(.client-header:not([hidden])) .logo { height: 36px; }
  .logo { height: 56px; }

  .navbar { position: sticky; top: 0; z-index: 50; }
  .navbar-inner { flex-wrap: nowrap; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; position: relative; }
  .tabs { flex: 1 1 auto; width: auto; min-width: 0; }
  .tab { font-size: 13px; padding: 8px 10px; }
  .account-menu-btn {
    display: block; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
    background: transparent; color: #fff; border: 1px solid #30343B; font-size: 20px; line-height: 1; cursor: pointer;
  }
  .account {
    display: none; position: absolute; right: 8px; top: calc(100% + 6px); width: auto; min-width: 220px;
    flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; padding: 16px 18px;
    background: var(--grey-2, #1b1f25); border: 1px solid #30343B; border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5); font-size: 15px;
  }
  .account.open { display: flex; }
  #accountName { font-size: 13px; }

  main .view { padding-top: 18px; }
  .display { font-size: 26px; }
  .summary { font-size: 14px; margin: 8px 0 16px; }
}

/* Phone, round 2: tighter spacing everywhere, the client name on one line,
   History's date range and quick filters in compact rows. */
@media (max-width: 760px) {
  .brandbar .client-header { min-width: 0; }
  .brandbar .client-header .company-title {
    font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-decoration-thickness: 2px; text-underline-offset: 5px; border-bottom: 0;
  }
  .brandbar .client-header .welcome-line { font-size: 12px; }
  .brandbar-inner:has(.client-header:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; }
  .brandbar-inner:has(.client-header:not([hidden])) .logo { height: 28px; }

  .tab { font-size: 13px; padding: 7px 10px; }
  .account-menu-btn { width: 34px; height: 34px; font-size: 18px; }

  main { padding: 14px 14px 60px; }
  .view-head { margin: 0; }
  .section-title, .display { font-size: 24px; }
  .summary:not([id]) { display: none; }       /* page intros: helpful on a computer, clutter on a phone */
  .detail-card { padding: 14px; border-radius: 12px; margin-bottom: 14px; }
  .geo-top { padding: 12px 14px; margin-bottom: 14px; }
  .geo-label { font-size: 11px; margin-bottom: 6px; }
  select.search, .search { font-size: 14px; padding: 9px 14px; }
  .history-title { font-size: 22px; }
  #view-history .history-head { margin-bottom: 10px; }
  .btn-small { padding: 6px 12px; font-size: 12.5px; }

  /* From | To | Show on one row, then the quick ranges and filters as small chips */
  .range { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin: 0 0 10px; }
  .range label { font-size: 12px; min-width: 0; }
  .range input { width: 100%; min-width: 0; font-size: 14px; padding: 8px 8px; }
  .range > .btn { height: 38px; }
  .range .filters { grid-column: 1 / -1; }
  .filters { gap: 6px; flex-wrap: wrap; }
  .chip { padding: 6px 12px; font-size: 12.5px; }
}

/* Phone: History rows as compact cards -
     26 Nov, 11:29                Driver (user)
     Confirmed locked  Battery 100%
     PREPAY - MEGA MEAT BUTCHERY  View on map  GPS ±19 m          */
@media (max-width: 760px) {
  #historyBody tr {
    display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px;
    grid-template-areas: "when who" "what what" "where where";
    padding: 10px 2px;
  }
  #historyBody td { width: auto; padding: 0; min-width: 0; }
  #historyBody td[data-label]::before { display: none; }
  #historyBody td[data-label="When"] { grid-area: when; font-size: 12.5px; color: var(--muted); }
  #historyBody td[data-label="Who"] { grid-area: who; font-size: 12.5px; color: var(--muted); text-align: right; }
  #historyBody td[data-label="What happened"] { grid-area: what; font-size: 15px; font-weight: 600; }
  #historyBody td[data-label="What happened"] .secondary-text,
  #historyBody td[data-label="What happened"] div { display: inline; font-weight: 400; font-size: 12.5px; margin-left: 6px; }
  #historyBody td[data-label="Where"] { grid-area: where; font-size: 12.5px; }
  #historyBody td[data-label="Where"] > div,
  #historyBody td[data-label="Where"] > a,
  #historyBody td[data-label="Where"] > span { display: inline; margin-right: 8px; }
  #historyBody td[data-label="Where"] b { font-weight: 700; }
}
@media (max-width: 760px) {
  .btn-small { white-space: nowrap; }
  .view-head { margin-bottom: 10px; }
  #historyBody td[data-label="Where"] .secondary-text { white-space: nowrap; }
}
@media (max-width: 760px) {
  #view-history .history-head .btn { align-self: flex-start; height: auto; }
  #historyBody td[data-label="Where"] a { white-space: nowrap; }
}
