/* =========================================================================
   Lüdi Field App — component styles
   Built on top of colors_and_type.css. Uses design tokens only.
   ========================================================================= */

* { -webkit-tap-highlight-color: transparent; }

/* Ensure [hidden] wins over flex/grid display rules */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overscroll-behavior-y: contain;
}

button { font: inherit; color: inherit; }
input, textarea { font: inherit; }

/* ---- Screen scaffold ----------------------------------------------------- */
.screen {
  min-height: 100vh;
  background: var(--bg-page);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
/* Pages with both CTA bar and nav bar need extra room */
body[data-page="new-job"] .screen,
body[data-page="history"] .screen {
  padding-bottom: calc(200px + env(safe-area-inset-bottom));
}

.section       { padding: 22px 16px 0; }
.section-tight { padding: 20px 16px 0; }

.screen-title {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--fg-1);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.screen-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-3);
  margin: 6px 0 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 10px;
}
.eyebrow-strong {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---- Header -------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(242, 240, 232, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  box-sizing: border-box;
}
.header-mark   { width: 30px; height: 40px; object-fit: contain; margin-left: -2px; }
.header-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--fg-1);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ---- Status pill --------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-pill[data-status="synced"]  { background: rgba(92,138,92,0.12);  color: #3d6b3d; }
.status-pill[data-status="synced"]  .dot { background: var(--ludi-synced); }
.status-pill[data-status="pending"] { background: rgba(201,138,46,0.15); color: #7e5518; }
.status-pill[data-status="pending"] .dot { background: var(--ludi-pending); }
.status-pill[data-status="offline"] { background: rgba(84,102,99,0.12);  color: var(--ludi-charcoal); }
.status-pill[data-status="offline"] .dot { background: var(--ludi-charcoal-soft); }

/* ---- Service pills ------------------------------------------------------- */
.pill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.service-pill {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--fg-2);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.service-pill[aria-pressed="true"] {
  font-weight: 600;
  border-color: var(--ludi-charcoal);
  background: var(--ludi-charcoal);
  color: var(--ludi-cream);
}
.service-pill:active { transform: scale(0.98); }

/* ---- Inline error ------------------------------------------------------- */
.svc-error {
  margin: 4px 0 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: #c0392b;
}

/* ---- Fields -------------------------------------------------------------- */
.field-stack { padding: 22px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.field .input-wrap { position: relative; }
.field input,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--fg-1);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field input { height: 52px; padding: 0 16px; }
.field textarea { padding: 14px 16px; resize: none; line-height: 1.5; min-height: 96px; }

.field input:focus,
.field textarea:focus { box-shadow: var(--shadow-focus); border-color: var(--ludi-charcoal); }

.field.has-prefix input {
  font-family: var(--font-display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  padding-left: 36px;
}
.field .prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--fg-3);
  pointer-events: none;
}

/* ---- Photo zone ---------------------------------------------------------- */
.photo-empty {
  width: 100%;
  height: 200px;
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--fg-3);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.photo-empty:active { background: var(--ludi-cream-deep); }
.photo-empty .title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--fg-1);
}
.photo-empty .hint { font-family: var(--font-body); font-size: 13px; }

.photo-hero {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ludi-cream-deep);
}
.photo-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-chip, .photo-remove, .photo-count {
  position: absolute;
  background: rgba(42, 55, 52, 0.75);
  color: var(--ludi-cream);
  font-family: var(--font-body);
  border-radius: var(--radius-pill);
}
.photo-chip {
  top: 10px; left: 10px;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.photo-remove {
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-count {
  bottom: 10px; right: 10px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
}
.photo-add-link {
  align-self: flex-start;
  background: transparent;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  color: var(--ludi-charcoal);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.photo-block { display: flex; flex-direction: column; gap: 10px; }

/* ---- Toggle row ---------------------------------------------------------- */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.toggle-row .copy { flex: 1; }
.toggle-row .title  { font-family: var(--font-display); font-size: 17px; color: var(--fg-1); }
.toggle-row .detail { font-family: var(--font-body);    font-size: 13px; color: var(--fg-3); margin-top: 2px; }

.toggle {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-med) var(--ease-out);
}
.toggle .knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left var(--dur-med) var(--ease-out);
}
.toggle[aria-pressed="true"] { background: var(--ludi-wattle); }
.toggle[aria-pressed="true"] .knob { left: 25px; }

/* ---- Offline note -------------------------------------------------------- */
.offline-note {
  padding: 28px 16px 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-3);
  text-align: center;
  line-height: 1.55;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-2);
}
.btn-lg { height: 60px; font-size: 17px; }
.btn-primary { background: var(--ludi-charcoal); color: var(--ludi-cream); }
.btn-primary:active { background: var(--ludi-charcoal-ink); transform: scale(0.98); }
.btn-full { width: 100%; }

.icon-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--ludi-charcoal);
}
.icon-btn:active { background: var(--ludi-cream-deep); transform: scale(0.98); }

/* ---- Bottom CTA bar ------------------------------------------------------ */
.cta-bar {
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  padding: 14px 16px 18px;
  background: linear-gradient(
    to bottom,
    rgba(242,240,232,0) 0%,
    rgba(242,240,232,0.95) 40%,
    rgba(242,240,232,1) 100%
  );
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 5;
}

/* ---- Earnings card ------------------------------------------------------- */
.earnings {
  position: relative;
  overflow: hidden;
  margin: 6px 16px 4px;
  background: var(--ludi-charcoal-ink);
  border-radius: var(--radius-xl);
  padding: 26px 24px 28px;
  box-shadow: 0 2px 4px rgba(42,55,52,0.10), 0 12px 32px rgba(42,55,52,0.22);
}
.earnings .eyebrow-dark {
  position: relative;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,240,232,0.6);
}
.earnings .total {
  position: relative;
  font-family: var(--font-display);
  font-size: 72px;
  color: var(--ludi-cream);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.earnings .total .currency {
  font-size: 44px;
  color: var(--ludi-wattle);
  margin-right: 2px;
  vertical-align: 0.18em;
  letter-spacing: 0;
}
.earnings .meta {
  position: relative;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(242,240,232,0.7);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.earnings .meta .count  { color: var(--ludi-cream); font-weight: 600; }
.earnings .meta .pend   { display: inline-flex; align-items: center; gap: 6px; color: var(--ludi-wattle); font-weight: 600; }
.earnings .meta .pend i { width: 6px; height: 6px; border-radius: 50%; background: var(--ludi-wattle); display: inline-block; }
.earnings .meta .tiny-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(242,240,232,0.35); }
.earnings .sprig {
  position: absolute;
  right: -18px; bottom: -28px;
  width: 180px; height: 240px;
  opacity: 0.22;
  pointer-events: none;
  filter: brightness(1.8) saturate(1.2);
}
.earnings .highlight {
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(216,200,74,0.18) 0%, rgba(216,200,74,0) 65%);
  pointer-events: none;
}

/* ---- Day sections + job cards ------------------------------------------- */
.day-label { padding: 18px 16px 8px; }
.day-jobs  { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }

.job-card {
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 0 rgba(61,78,74,0.04), 0 2px 6px rgba(61,78,74,0.06);
  cursor: pointer;
  font-family: var(--font-body);
}
.job-card:active { background: var(--ludi-cream-deep); transform: scale(0.995); }
.job-card .row-1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.job-card .client {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.job-card .price {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
}
.job-card .row-2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-3);
}
.job-card .svc  { color: var(--ludi-charcoal); font-weight: 500; }
.job-card .tiny { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.job-card .sync { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.job-card .sync i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.job-card .sync[data-sync="synced"]  { color: #3d6b3d; }
.job-card .sync[data-sync="synced"]  i { background: var(--ludi-synced); }
.job-card .sync[data-sync="pending"] { color: #7e5518; }
.job-card .sync[data-sync="pending"] i { background: var(--ludi-pending); }

/* ---- Empty state for history -------------------------------------------- */
.history-empty {
  margin: 28px 16px 0;
  padding: 28px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-3);
}

/* ---- Fade-in for entry --------------------------------------------------- */
@keyframes ludi-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: ludi-rise var(--dur-med) var(--ease-out) both; }

/* ---- Visually hidden ----------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Bottom nav bar ------------------------------------------------------ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  background: var(--ludi-charcoal);
  padding-bottom: env(safe-area-inset-bottom);
  min-height: 64px;
  border-top: 1px solid rgba(0,0,0,0.15);
}
.bottom-nav-tab {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 12px;
  color: rgba(242,240,232,0.68);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.bottom-nav-tab svg { width: 22px; height: 22px; stroke: currentColor; }
.bottom-nav-tab:active { color: var(--ludi-cream); }
body[data-page="new-job"]       .bottom-nav-tab[data-tab="home"],
body[data-page="history"]       .bottom-nav-tab[data-tab="history"],
body[data-page="clients"]       .bottom-nav-tab[data-tab="clients"],
body[data-page="client-detail"] .bottom-nav-tab[data-tab="clients"] {
  color: var(--ludi-wattle);
}

/* ---- Generic header action buttons -------------------------------------- */
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--ludi-charcoal);
  color: var(--ludi-cream);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.header-action:active { background: var(--ludi-charcoal-ink); transform: scale(0.98); }
.header-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ludi-charcoal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}
.header-back:active { background: var(--ludi-cream-deep); }

/* ---- Search bar --------------------------------------------------------- */
.search-field {
  padding: 14px 16px 0;
}
.search-field input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg-1);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-field input:focus { box-shadow: var(--shadow-focus); border-color: var(--ludi-charcoal); }

/* ---- Client list -------------------------------------------------------- */
.client-list {
  padding: 14px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.client-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: 0 1px 0 rgba(61,78,74,0.04), 0 2px 6px rgba(61,78,74,0.06);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-body);
}
.client-card:active { background: var(--ludi-cream-deep); transform: scale(0.995); }
.client-card .row-1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.client-card .name {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.client-card .job-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--ludi-wattle);
  color: var(--fg-on-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.client-card .phone { font-size: 14px; color: var(--fg-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.client-card .address { font-size: 13px; color: var(--fg-3); margin-top: 2px; }
.client-card .meta {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.client-card .meta .tiny { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.client-card .note-preview {
  font-size: 13px;
  color: var(--fg-3);
  font-style: italic;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  margin: 28px 16px 0;
  padding: 28px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-3);
}

/* ---- Client detail ------------------------------------------------------ */
.detail-header {
  padding: 18px 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-header .name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--fg-1);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.info-card {
  margin: 6px 16px 0;
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-card .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body);
}
.info-card .row .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.info-card .row .val {
  font-size: 15px;
  color: var(--fg-1);
  text-align: right;
  text-decoration: none;
}
.info-card .row a.val { color: var(--ludi-charcoal); font-weight: 600; }
.info-card .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.info-card .stat .num {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--fg-1);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.info-card .stat .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 2px;
}

.edit-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 16px 0;
}
.edit-fields .field input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
}
.edit-fields .field input:focus { box-shadow: var(--shadow-focus); border-color: var(--ludi-charcoal); }
.edit-actions {
  display: flex;
  gap: 10px;
  margin: 14px 16px 0;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--ludi-charcoal);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:active { background: var(--ludi-cream-deep); transform: scale(0.98); }
.btn-sm {
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.detail-section { padding: 22px 16px 0; }
.detail-section h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--fg-1);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.detail-section .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.detail-section .section-head h2 { margin: 0; }

.note-list { display: flex; flex-direction: column; gap: 10px; }
.note-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.note-item .ts {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 4px;
}
.note-item .txt { font-size: 15px; color: var(--fg-1); line-height: 1.45; white-space: pre-wrap; }

.note-editor { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.note-editor textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 90px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  resize: vertical;
}
.note-editor textarea:focus { box-shadow: var(--shadow-focus); border-color: var(--ludi-charcoal); }
.note-editor .row { display: flex; gap: 8px; justify-content: flex-end; }

.past-jobs { display: flex; flex-direction: column; gap: 8px; }
.past-job {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
}
.past-job .svc { font-size: 14px; color: var(--ludi-charcoal); font-weight: 500; }
.past-job .date { font-size: 12px; color: var(--fg-3); }
.past-job .price {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
}

.quick-action { padding: 22px 16px 0; }
.quick-action .btn-full { width: 100%; }

/* ---- Tap-to-call phone link --------------------------------------------- */
.info-card .row a.val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ludi-charcoal);
  font-weight: 600;
}
.info-card .row a.val svg { flex-shrink: 0; opacity: 0.8; }

/* ---- Toast -------------------------------------------------------------- */
.toast-layer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(80px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}
body[data-page="new-job"] .toast-layer,
body[data-page="history"] .toast-layer {
  bottom: calc(200px + env(safe-area-inset-bottom));
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ludi-charcoal);
  color: var(--ludi-cream);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-med) var(--ease-out),
              transform var(--dur-med) var(--ease-out);
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
