/* ============================================================
   Yingst Partners — Shared Stylesheet
   YINGST-PARTNERS-S1: extracted from yp-index.html so each page
   shares one stylesheet rather than re-pasting tokens. Cached
   across navigations, smaller HTML files, single source of
   truth for tokens.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================
   DESIGN TOKENS — pulled from BUILD-Q-PRC-S1.html so Yingst
   Partners feels visually continuous with InstaBuild.
   ============================================================ */
:root {
  --iron: #373133;
  --corduroy: #b28130;
  --corduroy-light: #c9993d;
  --burnt-umber: #77260e;
  --concrete: #dadad8;
  --cream: #f0eeea;
  --warm-white: #f7f5f2;
  --ink: var(--iron);
  --brown: var(--burnt-umber);
  --gold: var(--corduroy);
  --gold-light: var(--corduroy-light);
  --muted: #857a75;
  --border: #d8d4cf;
  --border-soft: #f0eeea;
  --card-bg: #ffffff;
  --accent-green: #3d5a47;
  --vivid-orange: #de6e21;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 14px;
  --space-lg: 18px;
  --space-xl: 24px;

  --font-serif: 'Cardo', Georgia, serif;
  --font-sans: 'Assistant', system-ui, -apple-system, sans-serif;
}

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding-top: env(safe-area-inset-top, 0);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
}

/* Body class .yp-has-bottomnav reserves space for the fixed nav */
body.yp-has-bottomnav {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0));
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ============================================================
   DIVISION SWITCHER (YINGST-PARTNERS-S1 multi-division addendum)
   Horizontal chip row shown below the header for field_staff
   with 2+ accessible divisions. Each chip represents an active
   division scope; tapping switches scope and reloads the page.
   ============================================================ */
.yp-division-switcher {
  display: flex;
  gap: 6px;
  padding: 10px var(--space-md) 6px;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.yp-division-switcher::-webkit-scrollbar { display: none; }

.yp-division-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--card-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.yp-division-chip:hover {
  border-color: var(--gold);
  color: var(--ink);
}
.yp-division-chip.is-active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  font-weight: 700;
}

/* ============================================================
   APP HEADER (shown on authed pages)
   ============================================================ */
.yp-header {
  background: var(--warm-white);
  padding: var(--space-lg) 20px var(--space-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.yp-brand-block {
  min-width: 0;
}
.yp-brand {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}
.yp-brand .accent { color: var(--gold); }
.yp-trade-name {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.yp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.yp-avatar:hover { background: var(--gold-light); }

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.yp-content {
  padding: var(--space-md) var(--space-md);
}

/* ============================================================
   STAT ROW (home screen)
   ============================================================ */
.yp-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.yp-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 12px 8px;
  text-align: center;
}
.yp-stat-card.is-warning { border-color: var(--vivid-orange); }
.yp-stat-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.yp-stat-card.is-warning .yp-stat-num { color: var(--vivid-orange); }
.yp-stat-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.yp-stat-card.is-warning .yp-stat-label { color: var(--vivid-orange); }

/* ============================================================
   COI WARNING CARD
   ============================================================ */
.yp-warning-card {
  background: var(--card-bg);
  border: 1px solid var(--vivid-orange);
  border-left: 3px solid var(--vivid-orange);
  padding: 11px var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.yp-warning-card .ti {
  font-size: 22px;
  color: var(--vivid-orange);
  flex-shrink: 0;
}
.yp-warning-body {
  flex: 1;
  min-width: 0;
}
.yp-warning-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.yp-warning-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================================
   SECTION EYEBROW (gold-line + Cardo label)
   ============================================================ */
.yp-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding: 0 var(--space-xs);
}
.yp-eyebrow-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.yp-eyebrow-line {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--gold);
}
.yp-eyebrow-text {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.yp-eyebrow-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.yp-eyebrow-action {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.04em;
  font-weight: 600;
  text-decoration: none;
}

/* ============================================================
   JOB CARD (today's work)
   ============================================================ */
.yp-job-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 13px var(--space-md);
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.yp-job-body { flex: 1; min-width: 0; }
.yp-job-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.yp-job-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.yp-job-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.yp-job-chev {
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 4px;
}

/* ============================================================
   PILLS
   ============================================================ */
.yp-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-block;
}
.yp-pill-task    { background: var(--ink); color: var(--cream); }
.yp-pill-time    { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; padding: 0; }
.yp-pill-pending { background: var(--gold); color: #fff; }
.yp-pill-confirmed { background: var(--accent-green); color: #fff; }

/* ============================================================
   AWAITING RESPONSE CARD
   ============================================================ */
.yp-await-card {
  background: var(--card-bg);
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  padding: 13px var(--space-md) 11px;
  margin-bottom: var(--space-lg);
}
.yp-await-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.yp-await-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.yp-await-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.yp-await-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.yp-action-btn {
  padding: 9px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.yp-action-btn .ti { font-size: 14px; }
.yp-action-accept  { background: var(--accent-green); color: #fff; }
.yp-action-suggest { background: var(--warm-white); color: var(--ink); border: 1px solid var(--gold); }
.yp-action-decline { background: transparent; color: var(--burnt-umber); border: 1px solid var(--border); }

/* ============================================================
   DOC ROWS
   ============================================================ */
.yp-doc-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 11px var(--space-md);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.yp-doc-icon {
  width: 32px;
  height: 32px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yp-doc-icon .ti { font-size: 18px; color: var(--muted); }
.yp-doc-body { flex: 1; min-width: 0; }
.yp-doc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yp-doc-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.yp-doc-chev {
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.yp-bottomnav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--warm-white);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0));
  z-index: 100;
}
.yp-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
}
.yp-nav-item .ti { font-size: 22px; }
.yp-nav-item-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.yp-nav-item.is-active { color: var(--gold); }
.yp-nav-item.is-active .yp-nav-item-label { font-weight: 700; }

a, button { -webkit-tap-highlight-color: rgba(178, 129, 48, 0.15); }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   JOB DETAIL PAGE — sticky breadcrumb header + content blocks
   YINGST-PARTNERS-S3: built from Day 4 mockup #2 (job-detail).
   Reuses .yp-eyebrow, .yp-pill, .yp-doc-row from shared components.
   ============================================================ */

/* Sticky breadcrumb header that replaces the brand header on detail pages.
   Stays at top of viewport during scroll so the trade always knows what
   job they're on. */
.yp-detail-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--warm-white);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.yp-detail-back {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink);
}
.yp-detail-back .ti { font-size: 22px; }
.yp-detail-title-block {
  flex: 1;
  min-width: 0;
}
.yp-detail-eyebrow {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.yp-detail-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yp-detail-kebab {
  background: none;
  border: none;
  padding: 4px;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
}
.yp-detail-kebab .ti { font-size: 20px; }

/* Job header card — address as Cardo headline, super + PO meta below */
.yp-job-header-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: var(--space-md);
}
.yp-job-tags-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.yp-pill-day {
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--border);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.yp-job-address {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.yp-job-context {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.yp-job-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.yp-meta-cell-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}
.yp-meta-cell-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.yp-meta-cell-link {
  font-size: 12px;
  color: var(--gold);
  margin-top: 2px;
  text-decoration: none;
  font-weight: 500;
}
.yp-meta-cell-link:hover { color: var(--gold-light); }

/* Mark Complete primary CTA — accent-green, full width, big tap target */
.yp-cta-complete {
  width: 100%;
  padding: 14px;
  background: var(--accent-green);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-lg);
}
.yp-cta-complete:hover { background: #2f4838; }
.yp-cta-complete .ti { font-size: 18px; }

/* Notes block (read-only message from super) */
.yp-notes-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 12px var(--space-md);
  margin-bottom: var(--space-lg);
}
.yp-notes-body {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.yp-notes-attribution {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  font-style: italic;
}

/* Photo grid — 3-column on mobile */
.yp-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: var(--space-lg);
}
.yp-photo-tile {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--border);
}
.yp-photo-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Placeholder gradient for mockup before real images wire in */
  background: linear-gradient(135deg, #6b6260, #908680);
}
.yp-photo-timestamp {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 9px;
  padding: 2px 5px;
  letter-spacing: 0.04em;
}
.yp-photo-add-tile {
  aspect-ratio: 1;
  background: var(--card-bg);
  border: 1.5px dashed var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  color: var(--gold);
}
.yp-photo-add-tile:hover { border-style: solid; background: var(--warm-white); }
.yp-photo-add-tile .ti { font-size: 26px; }
.yp-photo-add-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Secondary CTA — message super, etc. */
.yp-cta-secondary {
  width: 100%;
  padding: 12px;
  background: var(--warm-white);
  color: var(--ink);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}
.yp-cta-secondary:hover { border-color: var(--gold); }
.yp-cta-secondary .ti { font-size: 16px; color: var(--gold); }

/* Submit VPO — emphasis variant of secondary CTA */
.yp-cta-vpo {
  border-color: var(--corduroy);
  color: var(--corduroy);
}
.yp-cta-vpo:hover {
  border-color: var(--corduroy);
  background: rgba(178, 129, 48, 0.06);
}
.yp-cta-vpo .ti { color: var(--corduroy); }

/* ============================================================
   SCHEDULE PAGE — week strip + day-detail list
   YINGST-PARTNERS-S4: built from Day 4 mockup #3 (schedule).
   Week strip: 7 day chips with dot indicators showing job count.
   Day detail: same yp-job-card pattern as home, with optional
   left-edge status stripe (green=confirmed, gold=pending).
   ============================================================ */

.yp-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 8px var(--space-md) 12px;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.yp-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0 6px;
  background: none;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.yp-week-day:hover {
  border-color: var(--border);
}
.yp-week-day.is-today {
  border-color: var(--gold);
}
.yp-week-day.is-active {
  background: var(--ink);
  border-color: var(--ink);
}
.yp-week-day.is-active .yp-week-dow,
.yp-week-day.is-active .yp-week-num {
  color: var(--cream);
}
.yp-week-dow {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.yp-week-num {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.yp-week-day.is-today:not(.is-active) .yp-week-num {
  color: var(--gold);
}
.yp-week-dots {
  display: flex;
  gap: 2px;
  height: 4px;
  align-items: center;
  justify-content: center;
}
.yp-week-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.yp-week-day.is-active .yp-week-dot {
  background: var(--cream);
}
.yp-week-day.is-empty .yp-week-dots {
  height: 4px;
}
/* YINGST-PARTNERS-S4: dot variants for past-date completion state.
   Outlined ring = needs attention (incomplete past).
   Muted green = completed past (subtle confirmation, not loud). */
.yp-week-dot.is-incomplete-past {
  background: transparent;
  border: 1.5px solid var(--muted);
  width: 5px;
  height: 5px;
}
.yp-week-day.is-active .yp-week-dot.is-incomplete-past {
  border-color: var(--cream);
}
.yp-week-dot.is-completed-past {
  background: var(--accent-green);
  opacity: 0.55;
}
.yp-week-day.is-active .yp-week-dot.is-completed-past {
  background: var(--cream);
  opacity: 1;
}

/* Day detail header — date + total count */
.yp-day-detail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-lg) 0 var(--space-sm);
}
.yp-day-detail-date {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1;
}
.yp-day-detail-count {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.yp-day-empty {
  text-align: center;
  padding: 36px 24px;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  border: 1px dashed var(--border);
  margin-bottom: var(--space-lg);
}

/* Status-edge job card variant: same as yp-job-card but with a
   left-edge color stripe for at-a-glance status. */
.yp-job-card-edge {
  position: relative;
  padding-left: calc(var(--space-md) + 4px);
}
.yp-job-card-edge::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
}
.yp-job-card-edge.is-confirmed::before { background: var(--accent-green); }
.yp-job-card-edge.is-pending::before   { background: var(--gold); }

/* YINGST-PARTNERS-S4: footer note on past-day job cards.
   Two variants:
     (default) "Not marked complete · tap to update" — neutral,
       muted gray with gold action link. Lives at bottom of card.
     .is-done — "Marked complete" with green check. For past days
       where work was actually marked complete. Subtle confirmation.
   Today/future cards never show this footer (work hasn't happened). */
.yp-job-footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}
.yp-job-footer-note .yp-job-footer-action {
  color: var(--gold);
  font-weight: 600;
}
.yp-job-footer-note.is-done {
  color: var(--accent-green);
}
.yp-job-footer-note.is-done .ti {
  font-size: 14px;
}

/* Up-next preview at bottom of schedule */
.yp-upnext-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  padding: 12px var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.yp-upnext-icon {
  font-size: 22px;
  color: var(--muted);
  flex-shrink: 0;
}
.yp-upnext-body { flex: 1; min-width: 0; }
.yp-upnext-eyebrow {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.yp-upnext-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.yp-upnext-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.yp-upnext-chev {
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   AUTH PAGES — login / pick-mode / placeholder
   These don't have a header or bottom nav; they're standalone
   landing experiences with the brand centered.
   ============================================================ */
.yp-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}
.yp-auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
}
.yp-auth-brand-block {
  text-align: center;
  margin-bottom: 36px;
}
.yp-auth-brand {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}
.yp-auth-brand .accent { color: var(--gold); }
.yp-auth-tagline {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.yp-auth-tagline::before,
.yp-auth-tagline::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.yp-auth-headline {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.yp-auth-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 28px;
}

.yp-form-group {
  margin-bottom: 16px;
}
.yp-form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.yp-form-input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 16px; /* 16px prevents iOS zoom on focus */
  font-family: inherit;
  color: var(--ink);
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s;
}
.yp-form-input:focus {
  border-color: var(--gold);
}

.yp-btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.yp-btn-primary:hover { background: #2a2528; }
.yp-btn-primary:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
.yp-btn-primary .ti { font-size: 17px; }

.yp-auth-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 28px;
  line-height: 1.6;
}

.yp-auth-status {
  background: var(--warm-white);
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.yp-auth-status.is-success {
  border-color: var(--accent-green);
  border-left-color: var(--accent-green);
}
.yp-auth-status.is-error {
  border-color: var(--burnt-umber);
  border-left-color: var(--burnt-umber);
}
.yp-auth-status-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.yp-auth-status .ti { font-size: 16px; }

/* ============================================================
   MODE PICKER (owners choosing Office Admin vs Jobsite Work)
   Vertical stack on all sizes per agreed design.
   ============================================================ */
.yp-mode-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 22px 20px;
  margin-bottom: 12px;
  text-align: left;
  width: 100%;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.yp-mode-card:hover { border-color: var(--gold); }
.yp-mode-card:active { transform: scale(0.99); }
.yp-mode-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yp-mode-icon.is-office {
  background: var(--gold);
  color: #fff;
}
.yp-mode-icon.is-jobsite {
  background: var(--accent-green);
  color: #fff;
}
.yp-mode-icon .ti { font-size: 28px; }
.yp-mode-body { flex: 1; min-width: 0; }
.yp-mode-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.yp-mode-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.yp-mode-chev {
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   PLACEHOLDER PAGE (desktop admin coming soon)
   ============================================================ */
.yp-placeholder {
  text-align: center;
  padding: 40px 24px;
}
.yp-placeholder-icon {
  width: 64px;
  height: 64px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.yp-placeholder-icon .ti {
  font-size: 32px;
  color: var(--gold);
}
.yp-placeholder-headline {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: 8px;
}
.yp-placeholder-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.yp-placeholder-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.yp-signout-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 12px;
}
.yp-signout-link:hover { color: var(--burnt-umber); }

/* ============================================================
   DOCS PAGE — search, filter pills, expandable lot folders
   YINGST-PARTNERS-S5: built from Day 4 mockup #4 (documents).
   Reuses .yp-doc-row, .yp-eyebrow, .yp-warning-card.
   ============================================================ */

.yp-search-bar {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 10px var(--space-md);
}
.yp-search-input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 9px 12px 9px 36px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  border-radius: 0;
  outline: none;
}
.yp-search-input:focus { border-color: var(--gold); }
.yp-search-wrap { position: relative; }
.yp-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--muted);
  pointer-events: none;
}

.yp-filter-row {
  display: flex;
  gap: 6px;
  padding: 10px var(--space-md);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;
}
.yp-filter-row::-webkit-scrollbar { display: none; }

.yp-filter-pill {
  flex-shrink: 0;
  padding: 6px 11px;
  background: var(--card-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.yp-filter-pill:hover { border-color: var(--gold); color: var(--ink); }
.yp-filter-pill.is-active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.yp-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--card-bg);
  flex-shrink: 0;
  margin-right: 8px;
}
.yp-view-toggle-btn {
  padding: 6px 12px;
  background: none;
  color: var(--muted);
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.yp-view-toggle-btn.is-active {
  background: var(--gold);
  color: #fff;
  font-weight: 700;
}

.yp-lot-folder {
  background: var(--card-bg);
  border: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}
.yp-lot-folder-header {
  width: 100%;
  background: none;
  border: none;
  padding: 13px var(--space-md);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  border-bottom: 1px solid transparent;
}
.yp-lot-folder.is-expanded .yp-lot-folder-header {
  border-bottom-color: var(--border-soft);
}
.yp-lot-folder-icon {
  width: 28px;
  height: 28px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yp-lot-folder-icon .ti { font-size: 16px; color: var(--muted); }
.yp-lot-folder.is-expanded .yp-lot-folder-icon { background: var(--gold); }
.yp-lot-folder.is-expanded .yp-lot-folder-icon .ti { color: #fff; }
.yp-lot-folder-body { flex: 1; min-width: 0; }
.yp-lot-folder-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.yp-lot-folder-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.yp-lot-folder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.yp-lot-folder-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.yp-lot-folder-chev {
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.yp-lot-folder.is-expanded .yp-lot-folder-chev {
  transform: rotate(90deg);
}
.yp-lot-folder-content {
  display: none;
  padding: 4px 0 8px;
}
.yp-lot-folder.is-expanded .yp-lot-folder-content {
  display: block;
}

.yp-folder-doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--space-md);
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--border-soft);
}
.yp-folder-doc:first-child { border-top: none; }
.yp-folder-doc:hover { background: var(--warm-white); }
.yp-folder-doc-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yp-folder-doc-icon .ti { font-size: 18px; color: var(--muted); }
.yp-folder-doc-body { flex: 1; min-width: 0; }
.yp-folder-doc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yp-folder-doc-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.yp-folder-doc-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.yp-version-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--gold);
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.yp-version-pill.is-old {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.yp-new-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--accent-green);
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yp-docs-empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--border);
  margin-bottom: var(--space-lg);
}
.yp-docs-empty-icon {
  font-size: 32px;
  color: var(--border);
  margin-bottom: 12px;
}

/* ============================================================
   POs PAGE — money-state dashboard
   YINGST-PARTNERS-S6: trade-side financial visibility.
   Distinct from /docs — this is "where's my money" not "where's my paperwork."
   ============================================================ */

/* Money stat row — same grid as home stats but values are dollar amounts
   in Cardo serif (matches InstaBuild's price treatment). */
.yp-money-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.yp-money-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 12px 10px 10px;
  text-align: left;
}
.yp-money-stat.is-outstanding {
  border-color: var(--gold);
}
.yp-money-stat.is-paid {
  border-color: var(--accent-green);
}
.yp-money-stat-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.yp-money-stat-value {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.yp-money-stat-value .currency {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-right: 1px;
}
.yp-money-stat-value .cents {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.yp-money-stat.is-outstanding .yp-money-stat-value { color: var(--gold); }
.yp-money-stat.is-paid .yp-money-stat-value { color: var(--accent-green); }

/* PO card — distinct visual from doc rows. Larger amount, status pill. */
.yp-po-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 13px var(--space-md);
  margin-bottom: var(--space-sm);
  display: block;
  text-decoration: none;
  color: inherit;
}
.yp-po-card.is-vpo-pending {
  border-left: 3px solid var(--gold);
}
.yp-po-card.is-paid {
  background: var(--warm-white);
}
.yp-po-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.yp-po-card-info { flex: 1; min-width: 0; }
.yp-po-number-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 3px;
}
.yp-po-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.yp-po-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.yp-po-status.is-outstanding { background: var(--gold); color: #fff; }
.yp-po-status.is-invoiced { background: var(--ink); color: var(--cream); }
.yp-po-status.is-paid { background: var(--accent-green); color: #fff; }
.yp-po-status.is-vpo-pending { background: var(--corduroy); color: #fff; }
.yp-po-scope {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yp-po-amount {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.005em;
  flex-shrink: 0;
  text-align: right;
}
.yp-po-amount .currency {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.yp-po-amount .cents {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}
.yp-po-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--muted);
}
.yp-po-meta-row .yp-po-lot {
  font-weight: 600;
  color: var(--ink);
}
.yp-po-meta-row .yp-po-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

/* VPO chain — inline visualization of variance history attached to a PO */
.yp-vpo-chain {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.yp-vpo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
}
.yp-vpo-row .yp-vpo-label {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.yp-vpo-row .yp-vpo-label .ti { font-size: 13px; color: var(--corduroy); }
.yp-vpo-row.is-pending .yp-vpo-label { color: var(--corduroy); font-weight: 600; }
.yp-vpo-row.is-rejected .yp-vpo-label { color: var(--burnt-umber); text-decoration: line-through; }
.yp-vpo-row.is-approved .yp-vpo-label { color: var(--accent-green); }
.yp-vpo-row .yp-vpo-amount {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.yp-vpo-row.is-pending .yp-vpo-amount { color: var(--corduroy); }
.yp-vpo-row.is-rejected .yp-vpo-amount { color: var(--muted); text-decoration: line-through; }
.yp-vpo-row.is-approved .yp-vpo-amount { color: var(--accent-green); }
.yp-vpo-running-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.yp-vpo-running-total .yp-vpo-running-amount {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: -0.005em;
}

/* ============================================================
   MESSAGES PAGE — job-anchored thread inbox
   YINGST-PARTNERS-S7: built from Day 4 mockup #5 (messages).
   The architectural distinction vs TradeTopia: every thread is
   tied to a lot/PO/VPO context, not floating subjects.
   ============================================================ */

/* Thread card — distinct from doc rows. Two-context-pill row at top,
   sender + timestamp, preview line, optional new-message indicator. */
.yp-thread-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px var(--space-md) 12px;
  margin-bottom: 6px;
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.yp-thread-card.is-unread-urgent {
  border-left: 3px solid var(--vivid-orange);
}
.yp-thread-card.is-unread {
  border-left: 3px solid var(--gold);
}
.yp-thread-card.is-vpo-pending {
  border-left: 3px solid var(--corduroy);
}
.yp-thread-card.is-system {
  background: var(--warm-white);
}

.yp-thread-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.yp-thread-context-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.yp-thread-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.yp-thread-pill-lot       { background: var(--ink); color: var(--cream); }
.yp-thread-pill-context   { background: var(--cream); color: var(--ink); border: 1px solid var(--border); }
.yp-thread-pill-vpo       { background: var(--corduroy); color: #fff; }
.yp-thread-pill-vpo-pending { background: var(--gold); color: #fff; }
.yp-thread-pill-closed    { background: var(--accent-green); color: #fff; }
.yp-thread-pill-notice    { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.yp-thread-info { flex: 1; min-width: 0; }
.yp-thread-sender {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.2;
}
.yp-thread-card.is-unread-urgent .yp-thread-sender,
.yp-thread-card.is-unread .yp-thread-sender,
.yp-thread-card.is-vpo-pending .yp-thread-sender {
  font-weight: 700;
}
.yp-thread-sender-role {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.yp-thread-time {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 2px;
}
.yp-thread-card.is-unread-urgent .yp-thread-time,
.yp-thread-card.is-unread .yp-thread-time {
  color: var(--ink);
}

.yp-thread-preview {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  padding-right: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yp-thread-card.is-read .yp-thread-preview {
  color: var(--muted);
}
.yp-thread-preview-prefix {
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
}

.yp-thread-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.yp-thread-new-count {
  font-size: 11px;
  color: var(--vivid-orange);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.yp-thread-card.is-unread:not(.is-unread-urgent) .yp-thread-new-count {
  color: var(--gold);
}
.yp-thread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.yp-thread-card.is-unread-urgent .yp-thread-dot { background: var(--vivid-orange); }
.yp-thread-card.is-unread .yp-thread-dot { background: var(--gold); }
.yp-thread-card.is-vpo-pending .yp-thread-dot { background: var(--corduroy); }

/* Inbox header showing unread count */
.yp-inbox-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-md) 0 var(--space-sm);
}
.yp-inbox-headline {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1;
}
.yp-inbox-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.yp-inbox-meta-unread {
  color: var(--vivid-orange);
  font-weight: 700;
}

/* ============================================================
   BOTTOM SHEET COMPONENT — reusable across flows
   YINGST-PARTNERS-S8: Mark Complete is the first user, but pattern
   is intended for VPO submission, photo upload, date-shift picker.
   ============================================================
   Posture decisions (locked Day 5):
     - Auto-height (content-sized) by default
     - Slides up from bottom on entry
     - Dismissable via backdrop tap, drag-down, X button
     - Inline confirm step on primary action (no undo infra needed)
   ============================================================ */

.yp-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
}
.yp-sheet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.yp-sheet {
  background: var(--cream);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* prevent overscroll bleeding into page beneath */
  overscroll-behavior: contain;
  /* iOS safe-area for home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.yp-sheet-overlay.is-open .yp-sheet {
  transform: translateY(0);
}

/* Drag handle at top of sheet — visual affordance + tap target */
.yp-sheet-handle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.yp-sheet-handle {
  width: 38px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.yp-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6px var(--space-md) 12px;
  gap: 12px;
}
.yp-sheet-title-block { flex: 1; min-width: 0; }
.yp-sheet-eyebrow {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.yp-sheet-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.yp-sheet-close {
  background: none;
  border: none;
  padding: 6px;
  margin: -4px -4px 0 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  flex-shrink: 0;
}
.yp-sheet-close:hover { color: var(--ink); }
.yp-sheet-close .ti { font-size: 22px; }

.yp-sheet-body {
  padding: 0 var(--space-md) var(--space-md);
}
.yp-sheet-context {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 10px var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.yp-sheet-context strong { color: var(--ink); font-weight: 600; }

/* Form fields inside the sheet */
.yp-sheet-field-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.yp-sheet-field-label-optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}
.yp-sheet-textarea {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  border-radius: 0;
  outline: none;
  resize: none;
  min-height: 64px;
}
.yp-sheet-textarea:focus { border-color: var(--gold); }
.yp-sheet-textarea::placeholder {
  color: var(--muted);
  font-style: italic;
}

/* Optional secondary action (the "+ Add photo" button) */
.yp-sheet-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}
.yp-sheet-photo-button {
  flex: 1;
  background: var(--warm-white);
  border: 1px dashed var(--border);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.yp-sheet-photo-button:hover {
  border-style: solid;
  border-color: var(--gold);
  color: var(--ink);
}
.yp-sheet-photo-button .ti { font-size: 18px; color: var(--gold); }
.yp-sheet-photo-button.has-photo {
  border-style: solid;
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.yp-sheet-photo-button.has-photo .ti { color: var(--accent-green); }

/* Primary action button — full width, accent green */
.yp-sheet-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent-green);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.yp-sheet-primary:hover { background: #2f4838; }
.yp-sheet-primary .ti { font-size: 18px; }
.yp-sheet-primary.is-confirming {
  background: var(--corduroy);
  animation: yp-confirm-pulse 0.6s ease-out;
}
.yp-sheet-primary:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
@keyframes yp-confirm-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Completion state — replaces the Mark Complete CTA on job detail
   page after the sheet submits successfully. */
.yp-cta-complete-done {
  width: 100%;
  padding: 14px;
  background: rgba(61, 90, 71, 0.08);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-lg);
}
.yp-cta-complete-done .ti { font-size: 18px; }
.yp-cta-complete-done-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: none;
  margin-left: 8px;
}
