:root {
  --bg: #080c12;
  --bg-elevated: #0d131c;
  --surface: #121a26;
  --surface-2: #1a2433;
  --surface-3: #222e40;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f7fb;
  --muted: #8b9aab;
  --muted-2: #6b7a8c;
  --accent: #d4a017;
  --accent-soft: rgba(212, 160, 23, 0.16);
  --accent-glow: rgba(212, 160, 23, 0.35);
  --accent-text: #0d131c;
  --danger: #e05a48;
  --danger-soft: rgba(224, 90, 72, 0.18);
  --ok: #3dba7a;
  --ok-soft: rgba(61, 186, 122, 0.18);
  --info: #5b8def;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --tap: 48px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(212, 160, 23, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ——— Top bar + typographic wordmark ——— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(13, 19, 28, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-indent: 0.08em;
  text-transform: none;
  color: var(--text);
  line-height: 1.1;
  position: relative;
  display: inline-block;
  width: max-content;
  max-width: 100%;
}

.wordmark::after {
  content: "";
  display: block;
  height: 1.5px;
  width: 100%;
  margin-top: 5px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 42%, transparent 100%);
  border-radius: 1px;
  opacity: 0.9;
}

.wordmark-lg {
  font-size: 28px;
  letter-spacing: 0.22em;
  text-indent: 0.1em;
}

.wordmark-lg::after {
  height: 2px;
  margin-top: 8px;
}

.brand-sub {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.login-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 4px;
}

.login-tag {
  letter-spacing: 0.14em;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.view {
  flex: 1;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.hidden { display: none !important; }

/* ——— Cards ——— */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.optional { color: var(--muted-2); font-weight: 400; font-size: 12px; }

/* ——— Page headers (title + action — never overlap) ——— */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.page-head-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.page-head h2,
.module h2,
.panel h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
}

.page-head > h2 {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 4px;
}

.page-head .lede,
.lede {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 450;
}

.page-head > .btn,
.page-head > .seg {
  flex: 0 0 auto;
  align-self: flex-start;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* ——— Forms ——— */
.field { display: block; margin: 14px 0; }
.field span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.fields-2 { align-items: flex-start; }
.fields-2 .field { flex: 1; margin-top: 0; }

/* ——— Buttons ——— */
.btn {
  min-height: var(--tap);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, #e0b122 0%, var(--accent) 100%);
  color: var(--accent-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px var(--accent-glow);
}

.btn-primary:active { filter: brightness(0.95); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  margin-top: 12px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border-strong);
}

.btn-ghost:active { background: var(--surface-2); }

.btn-ok { background: var(--ok); color: #fff; }
.btn-warn { background: var(--danger); color: #fff; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.985); }

.error { color: #ff8f7a; font-size: 14px; margin: 8px 0; }

/* ——— Status / clock banner ——— */
.status-banner {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

#status-open .status-label {
  color: var(--ok);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
}

#status-closed .status-label {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.status-job { font-size: 18px; font-weight: 750; margin: 6px 0 4px; letter-spacing: -0.02em; }
.status-meta { color: var(--muted); font-size: 14px; margin-bottom: 4px; }

/* ——— Hours sub-tabs ——— */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tabs.admin { grid-template-columns: 1fr 1fr 1fr; }

.tab {
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.tab.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

/* ——— Module nav chips ——— */
.module-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 -4px 16px;
  padding: 4px 4px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.module-nav::-webkit-scrollbar { display: none; }

.module-tab {
  min-height: 36px;
  min-width: max-content;
  flex: 0 0 auto;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.module-tab.active {
  background: linear-gradient(180deg, #e0b122 0%, var(--accent) 100%);
  color: var(--accent-text);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
}

@media (min-width: 720px) {
  .module-nav { flex-wrap: wrap; overflow-x: visible; }
  .module-tab { font-size: 12px; }
}

/* ——— Lists / cards ——— */
.list { display: flex; flex-direction: column; gap: 10px; }

.job-card,
.entry-card,
.crew-card,
.ticket-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: left;
  color: inherit;
  width: 100%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.job-card:active,
.ticket-card:active { transform: scale(0.99); }

.job-title { font-weight: 750; font-size: 16px; letter-spacing: -0.015em; }
.job-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.job-card .cta {
  margin-top: 10px;
  display: inline-block;
  color: var(--accent);
  font-weight: 750;
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ——— Flex rows ——— */
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row.between {
  justify-content: space-between;
  align-items: center;
}

/* Equal-width action buttons only when NOT a header row */
.row:not(.between) > .btn { flex: 1; }
.row.between > .btn { flex: 0 0 auto; }

.seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: 0 0 auto;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  min-height: 36px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  font-family: inherit;
}

.seg-btn.active {
  background: var(--surface-2);
  color: var(--text);
}

.tm-scope { display: inline-flex; margin-bottom: 12px; }

.summary-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-card .big {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.summary-card .label { color: var(--muted); font-size: 13px; }

.entry-card .line1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.entry-card .line2 {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.crew-card .name { font-weight: 750; }
.crew-card .hours { color: var(--accent); font-weight: 800; }
.crew-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.footer {
  padding: 12px 16px 28px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.02em;
}

@media (min-width: 600px) {
  #app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
}

/* ——— Ticket cards ——— */
.ticket-card .line1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 750;
  align-items: flex-start;
}

.ticket-card .line2,
.ticket-card .line3 {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

/* ——— Badges ——— */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge-draft,
.badge-not_submitted { background: rgba(139, 154, 171, 0.18); color: var(--muted); }

.badge-submitted,
.badge-pending,
.badge-revise_resubmit { background: var(--accent-soft); color: var(--accent); }

.badge-super_approved,
.badge-approved,
.badge-paid { background: var(--ok-soft); color: #5fd99a; }

.badge-rejected { background: var(--danger-soft); color: #ff8f7a; }

.badge-open {
  display: inline-block;
  background: rgba(91, 141, 239, 0.2);
  color: #8eb6ff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-signed {
  background: var(--ok-soft);
  color: var(--ok);
  margin-left: 6px;
}

.money-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.money-row:last-child { border-bottom: none; }
.money-row strong { font-variant-numeric: tabular-nums; }
.money-row.total {
  font-weight: 800;
  color: var(--text);
  padding-top: 10px;
}

.detail-grid { display: grid; gap: 10px; }

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-row .k {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  min-width: 110px;
}

.detail-row .v { text-align: right; font-weight: 650; }

.detail-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.detail-block .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.detail-block .body { white-space: pre-wrap; }

.sig-wrap {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  touch-action: none;
}

.sig-wrap canvas {
  display: block;
  width: 100%;
  height: 140px;
  cursor: crosshair;
}

.sig-preview {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 8px;
  margin-top: 8px;
}

.sig-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--text);
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.admin-note-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  margin-bottom: 10px;
  font-family: inherit;
}

.form-section-label {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.chip-grid,
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.chip,
.tag-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.chip.active,
.tag-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.btn-pdf {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--accent);
  margin-top: 14px;
}

/* ——— Photos ——— */
.photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.photo-pick-wrap { position: relative; }
.photo-pick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.photo-gallery-sm {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.photo-thumb {
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.photo-thumb img,
.photo-preview-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #06090f;
}

.photo-preview-img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.photo-thumb-meta { padding: 8px 10px 10px; }
.photo-meta-line { font-size: 12px; font-weight: 700; line-height: 1.3; }
.photo-meta-line.muted,
.photo-thumb-meta .muted { font-weight: 500; color: var(--muted); }

.photo-full {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #06090f;
  display: block;
}

.photo-detail-card { overflow: hidden; }

.linkish {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.list-item-title {
  font-weight: 750;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.list-item-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}


/* ——— Job field dashboard ——— */
.job-back {
  margin: 0 0 8px -6px;
  padding-left: 6px;
  padding-right: 6px;
  color: var(--muted);
  font-weight: 700;
}

.job-identity .id-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.job-identity .id-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.job-identity .id-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.job-identity .id-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.dash-stat {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.dash-stat .n {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.dash-stat .l {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dash-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  min-height: 64px;
}

.dash-link:active { transform: scale(0.99); }

.dash-link .dl-title {
  font-weight: 750;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.dash-link .dl-meta {
  color: var(--muted);
  font-size: 12px;
}

.dash-link .dl-title .gold {
  color: var(--accent);
}

.activity-block { margin-bottom: 14px; }
.activity-block:last-child { margin-bottom: 0; }
.activity-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}

.file-card .file-main {
  min-width: 0;
  flex: 1;
}

.file-card .file-title {
  font-weight: 750;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card .file-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.file-card .file-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.badge-active {
  background: var(--ok-soft);
  color: #5fd99a;
}

.badge-plan, .badge-spec, .badge-submittal, .badge-other {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ——— Field home dashboard ——— */
/* Toggle: remove .field-home-module or set FIELD_HOME_DASH=false in app.js to revert */

.home-photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.home-photo-strip::-webkit-scrollbar {
  height: 4px;
}

.home-photo-strip::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}

.home-photo-card {
  flex: 0 0 118px;
  scroll-snap-align: start;
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.home-photo-card:active {
  transform: scale(0.98);
}

.home-photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #06090f;
}

.home-photo-cap {
  padding: 7px 8px 9px;
  border-top: 1px solid var(--border);
}

.home-photo-cap .cap-job {
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-photo-cap .cap-meta {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-empty {
  margin: 4px 0 0;
}

.home-activity-card .activity-block {
  margin-bottom: 0;
}

.home-job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 8px;
}

.home-job-row:last-child {
  margin-bottom: 0;
}

.home-job-row:active {
  transform: scale(0.99);
  border-color: var(--border-strong);
}

.home-job-row .hj-name {
  font-weight: 750;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.home-job-row .hj-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.home-job-row .hj-cta {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 750;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ——— Toast + busy submit ——— */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(16px);
  z-index: 9999;
  max-width: min(92vw, 360px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(18, 24, 34, 0.94);
  border: 1px solid var(--border-strong);
  color: #f4f7fb;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.app-toast-ok {
  border-color: rgba(70, 200, 140, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(70, 200, 140, 0.12);
}
.app-toast-warn {
  border-color: rgba(255, 160, 90, 0.5);
}
.app-toast-err {
  border-color: rgba(255, 120, 100, 0.55);
}
.btn.is-busy {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}

/* ——— Crew multi-select (who was on site) ——— */
.worker-pick {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px 2px;
  margin: 0;
}
.worker-pick .chip {
  position: relative;
}
.worker-pick .chip .chip-meta {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 2px;
}
.worker-pick .chip.logged {
  border-style: dashed;
  opacity: 0.85;
}
