/* =========================================================================
   [Company] Dashboard — global stylesheet
   Extracted from the <style> block previously inline in index.html so that:
     * the CSS is independently versionable / diffable in git
     * the local server's Cache-Control: no-store now applies cleanly per file
     * future style edits don't shuffle line numbers in the giant index.html
   See vendor/fonts.css for the @font-face rules; this file uses the Inter +
   Dancing Script families via plain font-family lookups.
   ========================================================================= */

:root {
  --avid-navy:       #1F4E79;
  --avid-navy-dark:  #143957;
  --avid-green:      #2E7D32;
  --avid-green-dark: #1B5E20;
  --accent:          #E08A1F;
  --accent-dark:     #B5640F;
  --bg:              #F5F7FA;
  --card:            #FFFFFF;
  --border:          #DCE3EC;
  --success:         #2E7D32;
  --warning:         #C77700;
  --alert:           #B43A3A;
  --neutral-500:     #5F6B7B;
  --neutral-800:     #1F2A37;
}
html, body { font-family:'Inter',system-ui,sans-serif; background:var(--bg); color:var(--neutral-800); }
.tnum { font-variant-numeric: tabular-nums; }
.truncate-1 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.scrollbar-thin::-webkit-scrollbar { width:8px; height:8px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background:#c8c4b6; border-radius:4px; }
.scrollbar-thin::-webkit-scrollbar-track { background:transparent; }
.stage-col { min-width:280px; max-width:280px; }
.card-hover { transition: transform .12s ease, box-shadow .12s ease; }
.card-hover:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.panel { transition: transform .18s ease; }
.panel.hidden-panel { transform: translateX(100%); }
.stage-pill { font-size:10px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--avid-navy);
              background:rgba(31,78,121,.08); padding:2px 6px; border-radius:3px; }
.iicrc-tag { font-family:'Inter',monospace; font-size:10px; color:var(--neutral-500); background:#eef2f7;
             border:1px solid var(--border); padding:1px 5px; border-radius:3px; }
.forms-chip { font-size:10px; font-weight:600; color:var(--accent-dark); background:rgba(43,194,229,.14);
              border:1px solid rgba(43,194,229,.4); padding:1px 6px; border-radius:10px; line-height:1.4;
              display:inline-flex; align-items:center; gap:2px; }
/* Contract-status dropdown (2026-06-14): a single highlighted "tab" showing the
   current status; click to reveal the three options. */
.contract-status-dd { }
.contract-status-dd > summary { list-style: none; cursor: pointer; }
.contract-status-dd > summary::-webkit-details-marker { display: none; }
/* Explicitly hide the options when collapsed (some app CSS overrides the
   native <details> content-hiding, so don't rely on it). */
.contract-status-dd:not([open]) > .cs-options { display: none; }
.contract-status-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: #fff; font-weight: 700; font-size: 12.5px; line-height: 1.2;
  padding: 9px 12px; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.contract-status-summary:hover { filter: brightness(1.05); }
.contract-status-dd .cs-caret { font-size: 11px; opacity: .85; transition: transform .15s ease; }
.contract-status-dd[open] .cs-caret { transform: rotate(180deg); }

.kanban-shell { height: calc(100vh - 240px); }
[data-tooltip]:hover::after {
  content: attr(data-tooltip); position:absolute; left:0; top:100%; background:#1F2A37; color:white;
  padding:4px 8px; font-size:11px; border-radius:4px; z-index:100; margin-top:4px; max-width:360px; white-space:normal;
}
[data-tooltip] { position:relative; }
.service-tab { color: rgba(255,255,255,0.72); font-size:13px; font-weight:500; padding:8px 16px;
               border-radius:6px 6px 0 0; border-bottom:3px solid transparent; transition: all .12s ease; }
.service-tab:hover { color:white; background:rgba(255,255,255,0.06); }
.service-tab-active { color:var(--avid-navy-dark) !important; background:var(--bg); border-bottom-color:var(--accent); font-weight:600; }
.tab-active { color:var(--avid-navy); border-bottom:2px solid var(--avid-navy); font-weight:600; }

/* =========================================================================
   RESPONSIVE: tablets (<=1023px) and phones (<=640px). 2026-09-06, Eric:
   "fix the dashboard so it looks professional and functions properly on
   mobile phones and tablets". Desktop (>=1024px) is untouched.

   Two tiers, tablet rules first so the phone tier can override them:
     <=1023  header wraps, nav swipes, the Mon-Sat week wraps to 3 columns
     <=640   header compacts to two rows, the week becomes a vertical day list
             (empty days hidden), cards and the customer hero go single-column,
             text and tap targets grow to phone sizes, form controls are 16px
             so iOS does not zoom on focus.

   Hooks (added in index.html for exactly this): .hdr-brand .hdr-search
   .hdr-actions .hdr-lookup .hdr-drive .sched-strip .sched-day
   .sched-day-empty .sched-gap .sched-card .detail-hero .hero-side .hero-main.
   Tailwind's md: utilities (>=768px) are injected AFTER this file, so the
   rules that fight them carry !important on purpose.
   ========================================================================= */
@media (max-width: 1023px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  html { -webkit-text-size-adjust: 100%; }

  /* header: brand, search, actions wrap; the connection dots go.
     `header .hdr-*` (0,1,1) outranks Tailwind's flex-1 / max-w-md (0,1,0),
     which the play CDN injects after this file. */
  header .hdr-top { padding-left: 16px; padding-right: 16px; gap: 8px 14px; }
  header .hdr-search { flex: 1 1 260px; max-width: none; }
  /* switchView() hides the search box inline on every tab but Pipeline while
     leaving its magnifier icon painted - on a phone that reads as a broken
     control. The palette works from any tab (openCustomerDetail relies on
     that), so on small screens it stays visible everywhere. !important beats
     the inline style. Desktop behaviour is unchanged. */
  header #search { visibility: visible !important; }
  #conn-status { display: none; }
  #search-results { min-width: 0 !important; max-width: calc(100vw - 32px) !important; }

  /* main nav: a swipe row with a fade hint on the right edge */
  .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
              -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
              mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); padding-right: 36px; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .service-tab { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; min-height: 42px; }

  /* week grid: six columns do not fit a tablet - wrap to three per row */
  #avid-schedule .sched-strip { flex-wrap: wrap !important; gap: 10px !important; overflow: visible !important; }
  #avid-schedule .sched-day { flex: 1 1 calc(33.333% - 10px) !important; width: auto !important; max-width: none !important; min-width: 200px; }
  #avid-schedule .sched-gap { display: none; }

  /* customer detail */
  .detail-breadcrumb { flex-wrap: wrap; row-gap: 6px; }
  .detail-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .detail-tabs > button { flex: 0 0 auto; white-space: nowrap; }
  .kanban-shell { height: auto; max-height: none; }
  .ov-grid { grid-template-columns: 96px 1fr !important; }
  .ov-grid div { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 640px) {
  /* ---- header: row 1 = brand + New Job, row 2 = search + Lookup ----
     .hdr-actions becomes `display: contents` so its buttons join the
     .hdr-top flex row directly and can be ordered around the search box. */
  header .hdr-top { padding: 10px 12px 8px; gap: 8px 8px; align-items: center; }
  header .hdr-actions { display: contents; }
  header .hdr-brand   { order: 1; flex: 1 1 auto; min-width: 0; }
  header #btn-new-job { order: 2; flex: 0 0 auto; margin-left: auto; }
  header .hdr-search  { order: 3; flex: 1 1 200px; max-width: none; min-width: 0; }
  header .hdr-lookup  { order: 4; flex: 0 0 auto; }
  header .hdr-brand > div { padding: 6px 10px; min-width: 0; }
  header .hdr-brand .text-lg { font-size: 16px; }
  header .hdr-drive { display: none; }                                   /* Drive setup is a desktop task */
  /* the Pipeline tab's two header filters: a third row while that tab shows
     them (switchView clears their inline visibility), gone otherwise */
  header #filter-sponsor, header #filter-type { order: 5; flex: 1 1 45%; min-height: 40px; }
  header #filter-sponsor[style*="hidden"], header #filter-type[style*="hidden"] { display: none; }
  header .hdr-lookup, header #btn-new-job { padding: 9px 12px; font-size: 13px; min-height: 40px; white-space: nowrap; }
  header #search { min-height: 42px; font-size: 16px; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.38); }
  header #search::placeholder { color: rgba(255,255,255,.78); }
  .nav-tabs { gap: 4px; }
  .service-tab { padding: 10px 12px; font-size: 13px; }

  /* ---- page gutters and controls ---- */
  [id^="view-"] > section { padding-left: 12px; padding-right: 12px; }
  select, input[type="text"], input[type="search"], input:not([type]), textarea { font-size: 16px; }
  #avid-filter-status, #avid-filter-sponsor, #avid-sort { flex: 1 1 100%; min-width: 0; min-height: 42px; }
  footer { padding-left: 12px; padding-right: 12px; }

  /* ---- schedule: a vertical list of days; empty days are not shown ---- */
  #avid-schedule > div { padding: 12px !important; }
  #avid-schedule .sched-strip { display: flex !important; flex-direction: column !important; gap: 10px !important; overflow: visible !important; }
  #avid-schedule .sched-day { flex: 0 0 auto !important; width: 100% !important; max-width: none !important; min-width: 0; }
  #avid-schedule .sched-day-empty { display: none !important; }
  #avid-schedule .sched-day > div:first-child { display: flex; justify-content: space-between; align-items: baseline; text-align: left; padding: 7px 12px; }
  #avid-schedule .sched-day > div:first-child > div:first-child { font-size: 12px; }
  #avid-schedule .sched-day > div:first-child > div:last-child  { font-size: 12px; }
  #avid-schedule .sched-day > div:last-child { min-height: 0 !important; padding: 8px; }
  #avid-schedule .sched-card { margin-bottom: 8px; }
  #avid-schedule .sched-card .p-2 { padding: 10px 12px; }
  #avid-schedule .sched-card .text-\[12px\]   { font-size: 15px; }
  #avid-schedule .sched-card .text-\[9\.5px\],
  #avid-schedule .sched-card .text-\[10px\],
  #avid-schedule .sched-card .text-\[10\.5px\] { font-size: 12.5px; line-height: 1.35; }
  #avid-schedule .sched-card .text-\[9px\] { font-size: 11px; }          /* Owner Occupied / Equity Community badges */
  #avid-schedule .sched-card .truncate { white-space: normal; overflow-wrap: anywhere; }
  #avid-schedule .sched-card a { display: inline-block; padding: 3px 0; }
  #avid-schedule .text-\[11px\] { font-size: 12px; }

  /* ---- customer detail: single-column hero, readable labels, big pills ---- */
  .detail-breadcrumb { padding: 10px 12px; gap: 6px 10px; }
  .detail-breadcrumb .ml-auto { margin-left: 0; width: 100%; justify-content: flex-start; }
  #view-customer .detail-hero { flex-direction: column; gap: 12px; padding: 14px !important; }
  #view-customer .hero-side { width: 100%; display: flex; align-items: flex-start; gap: 12px; }
  #view-customer .hero-side > div:first-child { flex: 0 0 auto; min-width: 140px; }
  #view-customer .hero-side .w-10 { width: auto; min-width: 56px; }       /* "ELECTRIC" no longer runs into its value */
  #view-customer .hero-main { width: 100%; }
  #view-customer h1 { font-size: 1.35rem; }
  #view-customer h1 .ml-6 { margin-left: 0; }
  #view-customer .detail-hero .truncate { white-space: normal; overflow-wrap: anywhere; }
  #view-customer .detail-hero button { min-height: 40px; padding: 9px 14px; }
  #view-customer .detail-hero .text-\[9px\]  { font-size: 11px; }
  #view-customer .detail-hero .text-\[11px\],
  #view-customer .detail-hero .text-\[11\.5px\] { font-size: 12.5px; }
  #view-customer .text-\[9px\]  { font-size: 11px; }
  #view-customer .text-\[10px\] { font-size: 12px; }
  #view-customer .detail-facts { font-size: 12.5px !important; }

  /* ---- planview tab on phones: sketch preview + full-screen PDF ---- */
  .pv-phone-preview img { width: 100%; max-height: 60vh; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
  .pv-phone-actions { display: flex; gap: 8px; margin-top: 10px; }
  .pv-phone-actions a, .pv-phone-actions button { flex: 1 1 45%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
}

/* ==========================================================================
   CUSTOMER DETAIL VIEW — density pass (2026-08-10)

   The expanded record ran 3,200px tall for one customer, most of it air:
   Tailwind's p-5 / py-3 / gap-4 rhythm is generous for a marketing page and
   loose for a record someone reads top to bottom. This tightens the LARGE
   spacings and deliberately leaves the small ones (py-1, gap-1, px-2) alone,
   so the result is compact without being cramped.

   Scoped to #view-customer so nothing else in the dashboard shifts, and the
   id+class specificity (0,1,1,0) beats Tailwind's bare class (0,0,1,0) —
   no !important needed. Utilities not listed here keep their Tailwind value.
   ========================================================================== */
#view-customer .p-5  { padding: 13px; }
#view-customer .p-4  { padding: 11px; }
#view-customer .p-3  { padding: 9px; }
#view-customer .px-6 { padding-left: 16px; padding-right: 16px; }
#view-customer .py-6 { padding-top: 14px; padding-bottom: 14px; }
#view-customer .px-4 { padding-left: 11px; padding-right: 11px; }
#view-customer .py-4 { padding-top: 11px; padding-bottom: 11px; }
#view-customer .py-3 { padding-top: 8px; padding-bottom: 8px; }
#view-customer .pt-4 { padding-top: 11px; }
#view-customer .pb-4 { padding-bottom: 11px; }
#view-customer .pt-3 { padding-top: 8px; }
#view-customer .pb-3 { padding-bottom: 8px; }

#view-customer .gap-6   { gap: 14px; }
#view-customer .gap-4   { gap: 10px; }
#view-customer .gap-3   { gap: 8px; }
#view-customer .gap-x-4 { column-gap: 10px; }
#view-customer .gap-y-6 { row-gap: 14px; }
#view-customer .gap-y-4 { row-gap: 10px; }

#view-customer .mb-6 { margin-bottom: 14px; }
#view-customer .mb-4 { margin-bottom: 10px; }
#view-customer .mb-3 { margin-bottom: 8px; }
#view-customer .mt-6 { margin-top: 14px; }
#view-customer .mt-4 { margin-top: 10px; }
#view-customer .mt-3 { margin-top: 8px; }
#view-customer .my-4 { margin-top: 10px; margin-bottom: 10px; }

/* space-y-* sets margin-top on every child after the first. */
#view-customer .space-y-6 > * + * { margin-top: 14px; }
#view-customer .space-y-4 > * + * { margin-top: 10px; }
#view-customer .space-y-3 > * + * { margin-top: 8px; }

/* Section headings carried their own generous block spacing. */
#view-customer h2 { margin-bottom: 8px; }
#view-customer h3 { margin-bottom: 6px; }

/* The record is mostly label/value rows — ~28 in the customer block alone,
   each 36px of which 8px was padding and the rest a 20px line box on 10-11px
   text. Tightening the row rhythm is where the real height was, not the
   card padding above. Kept at 2px rather than 0 so rows still separate. */
#view-customer .py-1    { padding-top: 2px; padding-bottom: 2px; }
#view-customer .py-1\.5 { padding-top: 3px; padding-bottom: 3px; }
#view-customer .py-2    { padding-top: 5px; padding-bottom: 5px; }
#view-customer .text-sm { line-height: 1.4; }
#view-customer .text-xs { line-height: 1.4; }

/* The "Property at a glance" strip in the detail header reuses the calendar
   card's fact rows. Everything is a one-line fact except the customer's
   reason, which wraps - give that row the full width instead of half. */
#view-customer .detail-facts > div { min-width: 0; }
#view-customer .detail-facts > div.whitespace-normal { grid-column: 1 / -1; }

/* ========================================================================== 
   FEATURED CUSTOMER CARD SHOWCASE
   Keeps the two mock appointments impossible to miss and gives the existing
   production card renderer a more polished, presentation-ready frame.
   ========================================================================== */
.wow-featured-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(82, 211, 182, .28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% -15%, rgba(51, 207, 170, .26), transparent 34%),
    radial-gradient(circle at -10% 110%, rgba(85, 137, 255, .2), transparent 34%),
    linear-gradient(135deg, #092d36 0%, #0d3a43 58%, #12354b 100%);
  box-shadow: 0 22px 60px rgba(5, 31, 39, .22);
}
.wow-featured-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 62%);
  mask-image: linear-gradient(to bottom, #000, transparent 62%);
}
.wow-featured-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  color: #fff;
}
.wow-featured-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #8ff1d6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}
.wow-featured-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #55e2b8;
  box-shadow: 0 0 0 5px rgba(85, 226, 184, .14), 0 0 22px rgba(85, 226, 184, .7);
}
.wow-featured-heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -.035em;
}
.wow-featured-heading p {
  max-width: 720px;
  margin-top: 5px;
  color: rgba(232, 250, 247, .72);
  font-size: 13px;
}
.wow-featured-hint {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #d8fff4;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}
.wow-featured-hint span { color: #67ebc5; margin-left: 4px; }
#avid-featured-cards { position: relative; z-index: 1; }
#avid-featured-cards > article {
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0,0,0,.22);
  transform: translateZ(0);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#avid-featured-cards > article:hover {
  transform: translateY(-4px);
  border-color: rgba(111, 238, 201, .9);
  box-shadow: 0 22px 46px rgba(0,0,0,.3), 0 0 0 3px rgba(96, 230, 191, .12);
}
.wow-card-loading {
  grid-column: 1 / -1;
  padding: 44px 20px;
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 16px;
  color: rgba(255,255,255,.72);
  text-align: center;
}
@media (max-width: 768px) {
  .wow-featured-shell { border-radius: 18px; padding: 14px; }
  .wow-featured-heading { align-items: start; }
  .wow-featured-hint { display: none; }
  #avid-featured-cards > article .px-20 { padding-left: 58px; padding-right: 58px; }
}

/* ==========================================================================
   DAILY SCHEDULE GRID
   Every assessment booked that day sits in ONE row across, whatever the
   count: `grid-auto-flow: column` means items never start a second row, and
   `1fr` columns make them share the width evenly - one card fills the page,
   three take a third each, seven take a seventh.

   The 300px floor is the only concession: below it the card stops being
   readable, so instead of shrinking further the row scrolls sideways. It is
   still one row, just one you swipe - which is what a phone can honestly do
   with six bookings.
   ========================================================================== */
.avid-day-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  overflow-x: auto;
  overflow-y: hidden;
  align-items: start;
  padding-bottom: 4px;          /* room for the scrollbar when it appears */
  scrollbar-width: thin;
}
.avid-day-grid::-webkit-scrollbar { height: 8px; }
.avid-day-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* A crowded day makes every share narrow, so the card tightens to match
   rather than breaking its own layout. */
.avid-day-grid.is-crowded { gap: 10px; }
.avid-day-grid.is-crowded .p-4 { padding: 10px; }
.avid-day-grid.is-crowded .p-5 { padding: 12px; }
.avid-day-grid.is-crowded .text-lg { font-size: 15px; }
.avid-day-grid.is-crowded .grid-cols-3 { gap: 4px; }

/* ==========================================================================
   DAILY CARD AT NARROW WIDTHS

   renderAvidCard was designed for a half-page card and positions its avatar
   and project number absolutely, with the title block padded (px-20) to leave
   them room. In the daily row that card can be 300px wide, at which point the
   reserved gutters are wider than the text needs and the header text collides
   with both corners. Below, inside the daily grid only, the header is put
   back into normal flow and everything that assumed a wide card is allowed to
   shrink or wrap instead of overlapping.
   ========================================================================== */
.avid-day-grid [data-avid-card] .absolute { position: static; }
.avid-day-grid [data-avid-card] .px-20 { padding-left: 0; padding-right: 0; }

/* Header becomes a simple stack: avatar, name, then the meta lines. */
.avid-day-grid [data-avid-card] > div:first-child {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.avid-day-grid [data-avid-card] > div:first-child > .text-right { text-align: center; }

/* Nothing in a narrow card may be pinned to one line. */
.avid-day-grid [data-avid-card] .truncate,
.avid-day-grid [data-avid-card] .whitespace-nowrap {
  white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word;
}

/* The money tiles and the property-summary chips are fixed-ish rows; let them
   shrink and wrap rather than run over their neighbours. */
.avid-day-grid [data-avid-card] .grid-cols-3 > * { min-width: 0; }
.avid-day-grid [data-avid-card] .tnum { font-variant-numeric: tabular-nums; word-break: break-all; }
.avid-day-grid [data-avid-card] [style*="min-width:128px"] { min-width: 0 !important; }
.avid-day-grid [data-avid-card] .flex-shrink-0 { flex-shrink: 1; min-width: 0; }
.avid-day-grid [data-avid-card] .flex-nowrap { flex-wrap: wrap; }

/* The card's body is a two-column grid (Customer | Project) sized for a
   half-page card. In a daily row every card is narrow, so those columns
   collide; one column always, and the small chip rows wrap rather than
   clipping their labels. */
.avid-day-grid [data-avid-card] .md\:grid-cols-2 { grid-template-columns: minmax(0, 1fr); }
.avid-day-grid [data-avid-card] .flex { flex-wrap: wrap; }
.avid-day-grid [data-avid-card] .grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

/* The property-summary strip is a rigid 5-column grid (Year/Style/Size/
   Stories/Rooms). In a 158px-wide card that gives each label a 22px column,
   so "Stories" and "Rooms" clip. Wrap into as many columns as fit instead. */
.avid-day-grid [data-avid-card] .grid-cols-5 {
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  row-gap: 6px;
}

/* ==========================================================================
   CUSTOMER-FOCUS MODE
   While a customer record is open, the dashboard-wide chrome is noise: the
   company block, global search, Lookup / Drive sync / New Job, the Local PDF
   and Drive dots, and the service tab row are all for CHOOSING a job, not for
   working one. The record carries its own Back and Back-to-dashboard buttons,
   so nothing becomes unreachable - openCustomerDetail() adds the class and
   backToAvid() takes it off.
   ========================================================================== */
body.customer-focus .hdr-top,
body.customer-focus .nav-tabs { display: none; }


/* Ported 2026-08-16: interactive PV planview editor overlay (same block
   as the parcel dashboard; keep in sync by hand). */
/* ── the interactive planview (full-page PDF annotation editor) ───────
   Ported from the auditor app; the parent styled this with Tailwind
   utilities, which this project does not carry, so the toolbar is styled
   here by hand. The page canvases and overlays style themselves inline. */
#pv-editor {
  position: fixed; inset: 0; z-index: 300;
  background: #3f3f46; display: flex; flex-direction: column;
}
.pv-bar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 12px; background: #1f2937; color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.pv-title { font-size: 13px; font-weight: 700; margin-right: 8px; white-space: nowrap; }
.pv-title span { font-weight: 400; opacity: .7; }
.pv-tool {
  width: 32px; height: 32px; border: 0; border-radius: 6px; cursor: pointer;
  background: #374151; color: #fff; font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
}
.pv-tool:hover { background: #4b5563; }
.pv-tool.on { background: var(--brand); }
.pv-color {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; padding: 0;
}
.pv-color.on { border-color: #fff; }
.pv-pick {
  margin-left: 4px; font-size: 11px; border: 0; border-radius: 5px;
  padding: 5px 4px; background: #374151; color: #fff;
}
.pv-sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); margin: 0 5px; }
.pv-spring { flex: 1; }
.pv-status { font-size: 11px; opacity: .7; margin-right: 8px; }
.pv-act {
  border: 0; border-radius: 6px; cursor: pointer; padding: 7px 12px;
  font-size: 12px; font-weight: 600; background: #374151; color: #fff;
}
.pv-act:hover { filter: brightness(1.15); }
.pv-act.save { background: var(--ok); }
.pv-act.save.unsaved { outline: 2px solid #fff; outline-offset: 1px; }
.pv-act.close { background: #7f1d1d; }
.pv-pages { flex: 1; overflow: auto; padding: 20px 12px; }

/* The panel-side launcher card. */
.pv-launch {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 4px 12px 10px; padding: 10px 12px;
  border: 1px solid var(--grid); border-radius: var(--r-s);
  background: var(--surface-2);
}
.pv-launch b { font-size: 12px; }
.pv-launch .hint { font-size: 10.5px; color: var(--ink-muted); flex-basis: 100%; }
.pv-launch button {
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: var(--r-s); padding: 6px 12px; font-size: 11.5px;
  font-weight: 600; cursor: pointer;
}
.pv-launch button.ghost {
  background: transparent; color: var(--brand);
}
.pv-launch input[type="file"] { display: none; }
