.dash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  --dash-max: none;
  --dash-auth: 420px;
  --dash-card: var(--color-ink-800);
  --dash-page-top: 20px;
  --chrome-top: max(16px, env(safe-area-inset-top));
  --chrome-side: 20px;
  background: var(--color-ink-900);
}

.dash-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: var(--color-ink-850);
  border-bottom: 1px solid var(--color-line);
}

.dash-chrome-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  margin-inline: 0;
  padding: var(--chrome-top) var(--chrome-side) 12px;
}

.dash .shell {
  position: relative;
  z-index: 1;
  min-height: 0;
  flex: 1;
  --chrome-top: 0;
  --chrome-side: 20px;
  max-width: none;
  width: 100%;
  margin-inline: 0;
}

.dash .body {
  padding: var(--dash-page-top) var(--chrome-side) 28px;
}

.dash .view:has(> .top:not([hidden])) .body {
  padding-top: 8px;
}

.dash .view > .top {
  padding: 12px var(--chrome-side) 0;
  padding-top: 12px;
  min-height: 48px;
}

.dash roadless-header {
  padding: 0;
}

.dash-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.dash-nav[hidden] { display: none; }

.dash roadless-header,
.dash-nav:not([hidden]) {
  display: contents;
}

.dash-tabs {
  order: 2;
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-tab {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.dash-tab.is-on {
  background: var(--color-fill-strong);
  color: var(--color-text);
}

.dash-tab[hidden] { display: none; }

.dash-nav-tools {
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.roady-dock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 3px 4px 3px 3px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-ink-800);
}

.roady-dock[hidden] { display: none; }

.roady-dock.is-live {
  border-color: var(--color-ink-500);
}

.dash-roady {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.dash-roady:hover { color: var(--color-text); }

.dash-roady[hidden] { display: none; }

.roady-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  flex: none;
}

.roady-avatar img,
.dash-roady img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.roady-dot {
  display: none;
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--color-ink-900);
  border-radius: 50%;
  background: var(--color-accent);
}

.roady-dock.is-live .roady-dot { display: block; }

.roady-dock-status {
  margin: 0;
  max-width: 180px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.3;
}

.roady-dock-status[hidden],
.roady-dock-btn[hidden] { display: none; }

.roady-dock-btn {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--color-fill-strong);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.roady-dock-btn:hover { background: var(--color-ink-700); }

.roady-dock-btn[aria-pressed="true"] {
  color: var(--color-text-muted);
}

.roady-hang {
  background: color-mix(in srgb, var(--color-danger) 16%, transparent);
  color: var(--color-danger);
}

.roady-hang:hover {
  background: color-mix(in srgb, var(--color-danger) 24%, transparent);
}

.roady-face {
  display: block;
  width: min(168px, 48vw);
  height: auto;
  aspect-ratio: 1;
  margin: 48px auto 0;
  border-radius: 50%;
  object-fit: cover;
}

.dash-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.dash-head .lede { margin-top: 6px; }

.dash-page-head {
  margin: 0;
}

.dash-page-head .lede {
  margin-top: 6px;
}

.dash [data-view=home] h1,
.dash [data-view=board] h1,
.dash [data-view=roady] h1,
.dash [data-view=payments] h1,
.dash [data-view=logs] h1,
.dash [data-view=live] h1,
.dash [data-view=ssh] h1,
.dash [data-view=barrier] h1,
.dash [data-view=lot] h1 {
  letter-spacing: -0.04em;
}

.dash-logout {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.dash-logout:hover { color: var(--color-text); border-color: var(--color-ink-500); }

.dash-logout.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

.dash-lots {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 28px;
}

.dash-lot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 88px;
  padding: 18px 44px 18px 18px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-ink-800);
  text-align: left;
}

.dash-lot::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--color-text-faint);
  border-bottom: 1.5px solid var(--color-text-faint);
  transform: translateY(-50%) rotate(-45deg);
}

.dash-lot:hover {
  border-color: var(--color-ink-500);
}

.dash-lot-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
}

.dash-lot-meta {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.dash-lot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 4px;
}

.dash-lot-head h1 { margin: 0; }

#lot-top[hidden],
#payments-top[hidden],
#logs-top[hidden] { display: none; }

#lot-id,
#payments-lot,
#logs-lot,
#ssh-lot {
  margin: 8px 0 0;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

#lot-local {
  display: block;
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  word-break: break-all;
}

#lot-local[hidden] { display: none; }

.lot-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}

#lot-ssh-card { display: contents; }
#lot-ssh-card[hidden] { display: none; }

.lot-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-ink-800);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.lot-jump-link:hover { border-color: var(--color-ink-500); }

.live-tabs { margin: 0; }

.live-find-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-plate-chip {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1.5px solid var(--color-accent);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(20, 61, 43, 0.15);
  vertical-align: middle;
}

.live-plate-bolt {
  position: relative;
  flex: none;
  width: 14px;
  background: var(--color-accent);
}

.live-plate-bolt::before,
.live-plate-bolt::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-ink-950);
  transform: translateX(-50%);
}

.live-plate-bolt::before { top: 4px; }
.live-plate-bolt::after { bottom: 4px; }

.live-plate-num {
  padding: 3px 8px;
  background: var(--color-paper);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.live-qr-panel { text-align: center; }

.live-qr-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 16px auto 0;
  padding: 16px;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 12px;
}

.live-qr-id {
  margin: 12px 0 4px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.live-empty {
  margin: 0;
  padding: 28px 14px;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  text-align: center;
}

.live-empty[hidden] { display: none; }

.live-hits {
  margin: 8px 0 0;
}

.live-hits .dash-h2 {
  margin: 0 0 12px;
}

.live-hits .live-tabs { margin: 0 0 8px; }

.live-hits .live-find-wrap {
  margin: 0 0 12px;
  max-width: 320px;
}

.live-events {
  list-style: none;
  margin: 0;
  padding: 4px 20px;
  max-height: min(72vh, 720px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-paper);
  box-shadow: var(--shadow-dash);
}

.live-events ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.live-more {
  flex: 0 0 auto;
  align-self: center;
  margin: 12px 0;
}

.live-more[hidden] { display: none; }

.live-event {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--color-line);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
}

.live-event:last-child { border-bottom: 0; }

button.live-event { cursor: pointer; }

button.live-event:hover { background: var(--color-fill); }

.live-event-kind {
  flex: none;
  padding: 3px 7px;
  border-radius: 5px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-event-kind.is-enter {
  background: var(--color-moss-weak);
  color: var(--color-moss);
}

.live-event-kind.is-exit {
  background: var(--color-sand-weak);
  color: var(--color-warn-ink);
}

.live-event-plate {
  min-width: 0;
}

.live-event-when {
  margin-left: auto;
  flex: none;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.live-event-qr {
  flex: none;
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--color-fill-strong);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}

button.live-event:hover .live-event-qr,
button.live-event-qr:hover {
  background: var(--color-accent);
  color: var(--color-ink-950);
}

button.live-event-qr { cursor: pointer; }

.live-event-shots {
  flex: none;
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--color-fill-strong);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.live-event-shots[aria-expanded="true"] {
  background: var(--color-accent);
  color: var(--color-ink-950);
}

.live-hit-shots {
  padding: 0 0 8px 28px;
}

.live-event.is-shot {
  padding: 6px 0;
}

.live-events[hidden] { display: none; }

.live-qr-panel .lede {
  display: flex;
  justify-content: center;
}

.live-qr-panel .live-plate-chip { margin-top: 4px; }

.lot-people,
.lot-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.lot-people:not(:has(.dash-card:not([hidden]))) { display: none; }

.lot-settings .dash-h2,
.lot-people .dash-h2 {
  margin-bottom: 4px;
}

.lot-settings .dash-help,
.lot-people .dash-help {
  margin: 0 0 14px;
}

.lot-settings .dash-fold {
  margin-top: 12px;
}

.lot-settings .dash-rows {
  margin-top: 4px;
}

.dash-ssh-frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--dash-card);
}

.dash-ssh-frame[hidden] { display: none; }

.dash-card {
  margin-top: 12px;
  padding: 18px 18px 20px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-ink-800);
}

.lot-people .dash-card,
.lot-settings .dash-card { margin-top: 0; }

.dash-label {
  display: block;
  margin: 0 0 6px;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}

.dash-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}

.dash-label-row .dash-label { margin: 0; flex: 1; min-width: 0; }

.dash-info {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.dash-info:hover { color: var(--color-text); border-color: var(--color-text-muted); }

.dash-unpaid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.dash-unpaid input {
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}

.dash-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.dash-form .field { margin-top: 0; }

.dash-form .field:has(.dash-days) { grid-column: 1 / -1; }

.dash-actions { margin-top: 18px; }
.barrier-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.barrier-actions .cta { min-width: 180px; }

#lot-unpaid-wrap {
  grid-column: 1 / -1;
}

#lot-unpaid-wrap:has(input:disabled) {
  opacity: 0.7;
  cursor: default;
}

#lot-unpaid-wrap .dash-info { opacity: 1; }

.dash select.control,
.dash input.control,
.dash textarea.control {
  border-radius: 10px;
  background: var(--color-ink-850);
}

select.control {
  appearance: none;
  color: var(--color-text);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9 1 4h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

#lot-loading[hidden],
#lot-empty[hidden],
#event-empty[hidden],
#event-date-field[hidden],
#permit-empty[hidden],
#owner-card[hidden],
#owner-empty[hidden],
#payments-loading[hidden],
#payments-empty[hidden],
#payments-pager[hidden],
#payments-total[hidden],
#logs-loading[hidden],
#logs-empty[hidden],
.dash-empty[hidden] { display: none; }

.dash-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.dash-page {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.dash-page:hover { border-color: var(--color-ink-500); }

.dash-page:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.dash-h2 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
}

.dash-empty {
  margin: 10px 0 0;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}

.dash-fold {
  margin-top: 14px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: var(--color-ink-850);
}

.dash-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.dash-fold summary::-webkit-details-marker { display: none; }

.dash-fold summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.dash-fold[open] summary::after { transform: rotate(-135deg); }

.dash-fold .dash-form,
.dash-fold .dash-actions { margin-inline: 14px; }

.dash-fold .dash-actions { margin-bottom: 14px; }

.dash-fold .dash-rows { margin: 0; padding: 0 6px 8px; }

.dash-fold .dash-empty { margin: 0; padding: 0 14px 12px; }

.dash-fold .dash-row {
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.dash-rows {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
}

.dash-logs {
  max-height: 70vh;
  overflow: auto;
}

.dash-logs .dash-row-copy {
  font-family: var(--font-mono);
}

.dash-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: var(--color-ink-850);
}

.dash-row-copy {
  flex: 1;
  min-width: 0;
  font-size: var(--text-sm);
}

.dash-remove {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.dash-remove:hover { color: var(--color-danger); }

.dash-copy {
  flex: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.dash-copy:hover { color: var(--color-text); }

.dash-logs .dash-row[aria-current="true"] {
  border-color: var(--color-ink-500);
}

.dash-total {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.04em;
}

#payments-range,
#logs-range {
  margin-top: 16px;
}

.dash-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-days button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.dash-days button.is-on {
  border-color: transparent;
  color: var(--color-text);
  background: var(--color-fill-strong);
}

.dash-help {
  margin: 6px 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

.dash-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: var(--color-ink-850);
}

.dash [data-view=phone] .body,
.dash [data-view=code] .body,
.dash [data-view=denied] .body {
  margin-top: 12px;
  padding: 24px 20px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--dash-card);
}

.dash [data-view=board] .lede,
.dash [data-view=payments] .lede,
.dash [data-view=logs] .lede,
.dash [data-view=home] .lede,
.dash [data-view=live] .lede,
.dash [data-view=ssh] .lede,
.dash [data-view=roady] .lede {
  margin-top: 6px;
}

.dash [data-view=home] #lot-loading.lede,
.dash [data-view=home] #lot-empty.lede {
  margin-top: 16px;
}

.board-page {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.board-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.board-toolbar-copy { min-width: 0; }

.board-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.board-person:not(:has(.board-person-mark)) { padding-left: 12px; }

.board-person:hover {
  border-color: var(--color-ink-500);
  color: var(--color-text);
}

.board-person.is-on {
  border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-ink-500));
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-text);
}

.board-person-mark {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--color-ink-600);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  line-height: 1;
}

.board-person-mark.is-empty {
  background: transparent;
  border: 1px dashed var(--color-ink-400);
}

.board-add {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0 20px 20px;
  border: 0;
  background: transparent;
}

.board-lane-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  height: 40px;
  padding: 0 12px;
  border: 1px dashed var(--color-line);
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: left;
}

.board-lane-add svg { flex: none; }

.board-lane-add:hover {
  border-color: var(--color-ink-400);
  background: var(--color-fill);
  color: var(--color-text);
}

textarea.control,
.board-desc {
  height: auto;
  min-height: 96px;
  padding: 14px 16px;
  line-height: 1.4;
  resize: vertical;
}

.board-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.board-add-row .cta { grid-column: 1 / -1; }

.board-lanes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  margin-top: 28px;
  min-height: 0;
}

.board-lane {
  display: flex;
  flex-direction: column;
  min-height: auto;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--color-line);
  border-radius: 0;
  background: transparent;
}

.board-lane:first-child { padding-top: 0; border-top: 0; }

.board-lane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 14px;
}

.board-lane-mark {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: var(--color-ink-400);
}

.board-lane[data-lane="todo"] .board-lane-mark { background: var(--color-accent); }
.board-lane[data-lane="blocked"] .board-lane-mark { background: var(--color-warn); }
.board-lane[data-lane="done"] .board-lane-mark { background: var(--color-ink-400); }

.board-lane-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.board-lane-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--color-fill-strong);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}

.board-lane-body {
  display: flex;
  flex-direction: column;
}

.board-lane-empty {
  margin: 0;
  padding: 36px 8px;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  text-align: center;
  line-height: 1.4;
}

.board-lane-empty[hidden] { display: none; }

.board-lane-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.board-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 14px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-ink-850);
  cursor: default;
  touch-action: pan-y;
}

@media (min-width: 720px) and (hover: hover) and (pointer: fine) {
  .board-card {
    cursor: grab;
    touch-action: none;
  }
}

.board-card select,
.board-card button { cursor: pointer; }

.board-card.is-dragging {
  pointer-events: none;
  opacity: 0.4;
  cursor: grabbing;
}

.board-lane.is-drop .board-lane-body {
  outline: 1px dashed var(--color-accent);
  outline-offset: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-accent) 6%, transparent);
}

body.is-board-drag {
  cursor: grabbing;
  user-select: none;
}

body.is-board-drag .board-card { cursor: grabbing; }

.board-card:hover {
  border-color: var(--color-ink-500);
  background: var(--color-ink-800);
}

.board-card[data-status="blocked"] {
  background: color-mix(in srgb, var(--color-warn) 7%, var(--color-ink-850));
}

.board-card[data-status="blocked"]:hover {
  background: color-mix(in srgb, var(--color-warn) 10%, var(--color-ink-800));
}

.board-card[data-status="done"] { opacity: 0.7; }

.board-card[data-status="done"] .board-card-title {
  color: var(--color-text-muted);
}

.board-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.board-card-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-card-id {
  margin: 0;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
}

.board-card-title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.03em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.board-card-desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.board-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--color-line);
}

.board-card-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.board-card-who .board-person-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.board-card-status,
.board-card-assignee {
  width: max-content;
  max-width: 100%;
  height: 28px;
  padding: 0 22px 0 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background-color: var(--color-fill-strong) !important;
  background-position: right 6px center !important;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1;
}

.board-card-assignee {
  padding-left: 0 !important;
  background-color: transparent !important;
}

.board-card[data-status="blocked"] .board-card-status {
  background-color: color-mix(in srgb, var(--color-warn) 16%, transparent) !important;
  color: var(--color-warn);
}

.board-card-status:focus,
.board-card-assignee:focus {
  outline: 1px solid var(--color-ink-500);
  outline-offset: 2px;
}

.board-card-remove {
  flex: none;
  width: 28px;
  height: 28px;
  margin-left: auto;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  color: var(--color-text-faint);
}

.board-card-remove:hover {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  color: var(--color-danger);
}

@media (min-width: 560px) {
  .dash { --chrome-side: 28px; }

  .dash .shell { --chrome-side: 28px; }

  .shell-wide {
    max-width: none;
    width: 100%;
    min-height: 0;
  }

  .shell-wide .view.is-active { flex: 0 1 auto; }

  .shell-wide h1 { font-size: var(--text-display); }

  .dash-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }

  .dash-tabs {
    flex: 1 1 auto;
    overflow: visible;
  }

  .shell-wide [data-view=phone] .body,
  .shell-wide [data-view=phone] .foot,
  .shell-wide [data-view=code] .body,
  .shell-wide [data-view=code] .foot {
    max-width: var(--dash-auth);
    width: 100%;
    margin-inline: auto;
  }

  .dash-actions {
    display: flex;
    justify-content: flex-end;
  }

  .dash-actions .cta {
    width: auto;
    min-width: 160px;
    padding-inline: 20px;
  }
}

@media (min-width: 720px) {
  .dash-card { padding: 20px 22px 22px; }

  .dash-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .dash-lots {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .lot-settings,
  .lot-people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }

  .lot-settings .dash-card,
  .lot-people .dash-card {
    min-height: 100%;
  }

  .board-toolbar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
  }

  .board-people { justify-content: flex-end; }

  .board-lanes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 32px;
    min-height: calc(100dvh - 240px);
  }

  .board-lane {
    min-height: 420px;
    padding: 0 18px;
    border-top: 0;
    border-right: 1px solid var(--color-line);
  }

  .board-lane:first-child { padding-left: 0; }

  .board-lane:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .board-lane-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .board-lane-list { overflow-y: auto; }

  .dash .sheet-panel {
    top: 50%;
    bottom: auto;
    width: min(var(--dash-auth), calc(100% - 48px));
    max-height: min(72dvh, 640px);
    border-radius: 16px;
    transform: translate(-50%, -50%);
    padding-bottom: 12px;
  }

  .dash .sheet-handle { display: none; }
}

@media (min-width: 880px) {
  .dash-chrome-bar {
    flex-wrap: nowrap;
    gap: 20px;
    padding-bottom: 14px;
  }

  .dash-tabs { order: 2; margin-right: auto; }
  .dash-nav-tools { order: 3; margin-left: 0; }

  .dash-chrome-bar:not(:has(#dash-nav:not([hidden]))) {
    justify-content: space-between;
  }
}

@media (max-width: 719px) {
  .dash-chrome-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "mark tools"
      "tabs tabs";
    align-items: center;
    gap: 8px 12px;
    padding-bottom: 10px;
  }

  .dash-chrome .mark { grid-area: mark; }

  .dash-tabs {
    grid-area: tabs;
    order: unset;
    flex: 0 1 auto;
    width: 100%;
  }

  .dash-nav-tools {
    grid-area: tools;
    order: unset;
    margin-left: 0;
    justify-self: end;
  }

  .dash-roady { padding-right: 2px; }

  #roady-call-label { display: none; }

  .dash [data-view=board].is-active {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  .dash [data-view=board] .board-toolbar-copy .lede { display: none; }

  .board-page {
    flex: none;
    overflow: visible;
  }

  .board-toolbar { gap: 12px; }

  .board-people {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: calc(-1 * var(--chrome-side));
    padding-inline: var(--chrome-side);
    scrollbar-width: none;
  }

  .board-people::-webkit-scrollbar { display: none; }

  .board-person { flex: none; }

  .board-lanes {
    display: flex;
    flex-direction: column;
    flex: none;
    min-height: 0;
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 20px;
    overflow: visible;
  }

  .board-lane {
    min-height: auto;
    height: auto;
    padding: 22px 0 0;
    border-top: 1px solid var(--color-line);
  }

  .board-lane:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .board-lane-body {
    flex: none;
    overflow: visible;
  }

  .board-lane-list { overflow: visible; }

  .board-card-status,
  .board-card-assignee {
    width: auto;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-fold summary::after { transition: none; }
}

/* Daily activity workspace */
.dash [data-view=live] { background: #f4f6f3; color: #20372e; min-height: calc(100vh - 74px); }
.dash [data-view=live] > .body { width: 100%; max-width: 1320px; margin: auto; padding: 12px 32px 48px; box-sizing: border-box; }
.dash [data-view=live] > .top { max-width: 1320px; margin: auto; padding: 18px 32px 0; }
.activity-header { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.activity-eyebrow { font-size:10px; font-weight:700; letter-spacing:.16em; color:#6e8276; margin:0 0 8px; }
.dash [data-view=live] h1 { font-size:36px; line-height:1.1; letter-spacing:-1.2px; margin:0 0 7px; }
#live-lot { margin:0; font-size:15px; color:#5b7064; text-transform:capitalize; }
.activity-refresh { background:white; border:1px solid #d4ddd5; border-radius:9px; padding:11px 16px; color:#254d3c; font:inherit; font-size:12px; cursor:pointer; }
.activity-caption { margin:12px 0 24px!important; font-size:12px!important; color:#748279!important; }
.activity-calendar { display:flex; align-items:center; gap:18px; margin-bottom:22px; }
.activity-label { display:block; font-size:10px; font-weight:600; color:#758278; letter-spacing:.04em; margin-bottom:8px; white-space:nowrap; }
.activity-calendar > .activity-label { margin:0; }
#live-days { gap:6px; margin:0; }
#live-days button { height:38px; background:#fff; border:1px solid #dce3db; border-radius:8px; color:#65786a; font-size:12px; padding:0 14px; }
#live-days button.is-on { background:#1e4b38; border-color:#1e4b38; color:#fff; }
.activity-totals { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:16px; margin-bottom:28px; }
.activity-stat { border:1px solid #dce4dc; background:white; border-radius:13px; padding:22px 24px; display:grid; gap:9px; }
.activity-stat:first-child { background:#1e4b38; color:white; border-color:#1e4b38; }
.activity-stat > span { font-size:12px; font-weight:600; color:#708073; }
.activity-stat:first-child > span,.activity-stat:first-child small { color:#c0d4c5; }
.activity-stat strong { font-size:42px; line-height:1; letter-spacing:-1.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.activity-stat small { color:#8a978d; font-size:11px; }
.activity-stat.is-entry > span { color:#427653; }
.activity-stat.is-exit > span { color:#ac7637; }
#live-hits { background:white; border:1px solid #dce4dc; border-radius:14px; margin:0; overflow:hidden; }
.activity-list-heading { display:flex; align-items:center; justify-content:space-between; padding:23px 24px 18px; }
.activity-list-heading h2 { font-size:17px!important; margin:0!important; letter-spacing:-.3px; }
.activity-list-heading p { margin:5px 0 0; font-size:11px; color:#8a978e; }
#live-visible-count { color:#8a978e; font-size:11px; }
.activity-toolbar { display:flex; align-items:end; gap:24px; padding:0 24px 22px; }
#live-hits .live-find-wrap { margin:0; flex:1; max-width:360px; }
#live-hits-find { height:39px; min-height:39px; width:100%; border:1px solid #dfe5df; border-radius:8px; background:#f8faf7; font-size:12px; }
.activity-toolbar .live-tabs { margin:0!important; display:flex; gap:2px; background:#f2f5f0; padding:3px; border-radius:8px; }
.activity-toolbar .live-tabs button { height:32px; font-size:11px; padding:0 12px; border:0; }
.activity-toolbar .live-tabs button.is-on { background:white; color:#254c39; box-shadow:0 1px 4px #132c1812; border-radius:6px; }
.activity-columns,.dash [data-view=live] .live-event { display:grid; grid-template-columns:minmax(130px,1.2fr) 110px 110px 110px 110px 125px; align-items:center; gap:16px; }
.activity-columns { padding:12px 24px; background:#f8faf6; border-block:1px solid #edf0e9; color:#879389; font-size:10px; text-transform:uppercase; letter-spacing:.07em; }
#live-hits-scroll { max-height:min(65vh,720px); padding:0; border:0; border-radius:0; box-shadow:none; background:white; }
#live-hits-list > li { border-bottom:1px solid #eef1eb; }
.dash [data-view=live] .live-event { padding:16px 24px; min-height:64px; box-sizing:border-box; border:0; }
.dash [data-view=live] .live-event:hover { background:#fafcf8; }
.live-event-plate { grid-column:1; grid-row:1; }
.live-event-kind { grid-column:2; grid-row:1; justify-self:start; font-size:9px; padding:4px 7px; }
.live-event-camera { grid-column:3; grid-row:1; font-size:11px; color:#859287; font-family:var(--font-mono); }
.live-event-when { grid-column:4; grid-row:1; margin:0; font-size:12px; color:#526657; }
.live-event-shots,.live-event-single { grid-column:5; grid-row:1; font-size:10px; justify-self:start; color:#7c8c80; }
.live-event-actions { grid-column:6; grid-row:1; display:flex; align-items:center; justify-content:end; gap:8px; }
.live-event-info { border:0; background:none; font-size:11px; color:#627e6b; cursor:pointer; padding:5px; }
.live-event-details { display:grid; grid-template-columns:160px 1fr; gap:9px 20px; margin:0; padding:20px 24px; background:#f6f9f2; font-size:11px; border-top:1px solid #e8ede3; }
.live-event-details dt { color:#84917e; }.live-event-details dd { margin:0; overflow-wrap:anywhere; color:#415f49; }
.dash [data-view=live] .live-hit-shots { padding:0; background:#f6f9f3; border-top:1px solid #e5ede0; }
.dash [data-view=live] .live-event.is-shot { padding-left:38px; opacity:.85; }
.activity-footnote { padding:16px 24px; border-top:1px solid #edf0e9; color:#8b978c; font-size:10px; line-height:1.7; background:#fafcf8; }
#live-hits-empty { padding:48px 24px; text-align:center; color:#879586; }
#live-hits-more { margin:18px auto; }
@media(max-width:1000px) {
 .activity-columns,.dash [data-view=live] .live-event { grid-template-columns:minmax(110px,1fr) 95px 90px 85px 90px 110px; gap:8px; }
 .activity-toolbar { gap:12px; flex-wrap:wrap; }
}
@media(max-width:740px) {
 .dash [data-view=live] > .body { padding:12px 14px 30px; }.dash [data-view=live] > .top { padding:14px 14px 0; }
 .dash [data-view=live] h1 { font-size:30px; }.activity-calendar { display:block; }.activity-calendar > .activity-label { margin-bottom:10px; }
 #live-days { flex-wrap:nowrap; overflow:auto; padding-bottom:6px; }#live-days button { flex:none; }
 .activity-totals { gap:8px; margin-bottom:18px; grid-template-columns:repeat(3,1fr); }.activity-stat { padding:16px 12px; border-radius:10px; }.activity-stat strong { font-size:30px; }.activity-stat small { font-size:9px; }.activity-stat > span { font-size:10px; }
 .activity-list-heading { padding:18px 14px; }#live-visible-count { display:none; }.activity-toolbar { padding:0 14px 16px; gap:14px; }.activity-toolbar .live-find-wrap { flex-basis:100%!important; max-width:none!important; }.activity-columns { display:none; }
 .dash [data-view=live] .live-event { grid-template-columns:minmax(110px,1fr) 85px 100px; grid-template-rows:auto auto; gap:10px; padding:16px 14px; }
 .live-event-kind { grid-column:2; grid-row:1; }.live-event-when { grid-column:3; grid-row:1; justify-self:end; }.live-event-camera { grid-column:1; grid-row:2; }.live-event-shots,.live-event-single { grid-column:2; grid-row:2; }.live-event-actions { grid-column:3; grid-row:2; }
 .live-event-details { grid-template-columns:1fr; gap:5px; padding:16px; }.live-event-details dd { margin-bottom:8px; }.activity-footnote { padding:14px; }
}
body.dash:has([data-view=live].is-active) { background:#f4f6f3; }
.dash [data-view=live] > .top { width:100%; box-sizing:border-box; justify-content:flex-start; }
.live-event-shots { white-space:nowrap; }

/* Laboratorio de placas: una tarjeta por pasada, fotos a la izquierda, lecturas a la derecha. */
.dash-meta { margin: 12px 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.dash-meta[hidden], .lab-summary[hidden] { display: none; }
.mono { font-family: var(--font-mono); }
.lab-summary { margin-top: 14px; overflow-x: auto; }
.lab-summary table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.lab-summary th, .lab-summary td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--color-line); white-space: nowrap; }
.lab-summary th { color: var(--color-text-muted); font-weight: var(--weight-medium); }
.lab-summary td.num, .lab-summary th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lab-passes .dash-row { display: block; padding: 14px; }
.lab-pass-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: 10px; }
.lab-pass-head .lab-kind { color: var(--color-text); font-weight: var(--weight-medium); }
.lab-frame-tag { grid-column: 1 / -1; margin: 0 0 4px; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: 0.04em; text-transform: uppercase; color: #427653; }
.lab-frame-tag[data-kind="exit"] { color: #ac7637; }
.lab-frames { display: flex; flex-direction: column; gap: 12px; }
.lab-frame { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 14px; align-items: start; }
.lab-frame-shot { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-line); background: var(--color-ink-900); aspect-ratio: 4 / 3; }
.lab-frame-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-frame-shot.is-gone { display: grid; place-items: center; color: var(--color-text-faint); font-size: var(--text-xs); }
.lab-reads { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: var(--text-sm); align-content: start; }
.lab-reads dt { color: var(--color-text-muted); }
.lab-reads dd { margin: 0; font-family: var(--font-mono); }
.lab-reads dd .lab-conf { color: var(--color-text-faint); font-family: var(--font-sans); margin-left: 6px; }
.lab-reads dd.is-match { color: var(--color-accent); }
.lab-reads dd.is-miss { color: var(--color-danger); }
.lab-reads dd.is-blank { color: var(--color-text-faint); }
.lab-truth { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.lab-truth input { height: 36px; width: 140px; font-family: var(--font-mono); text-transform: uppercase; }
.lab-truth .dash-page { height: 36px; padding: 0 12px; }
.lab-truth-state { color: var(--color-text-muted); font-size: var(--text-xs); }
@media (max-width: 640px) {
  .lab-frame { grid-template-columns: 1fr; }
}
