/* ==========================================================================
   Pinewood Property Services: admin dashboard and customer portal.

   Separate from site.css on purpose: the marketing pages and the app share a
   palette and two typefaces, nothing else. The tokens below are copied from
   the top of assets/css/site.css; if the palette there changes, change it
   here too. Same restraint as the site: square geometry, hairlines instead
   of shadows, colour by judgement.
   ========================================================================== */

@font-face{font-family:"Archivo";font-style:normal;font-weight:500 700;font-stretch:100%;font-display:swap;src:url(/assets/fonts/archivo-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Inter";font-style:normal;font-weight:400 600;font-display:swap;src:url(/assets/fonts/inter-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

:root{
  --cream:#F4EDE0;
  --cream-lift:#FAF5EB;
  --sand:#DFD2B8;
  --sand-deep:#C9BB9B;
  --cypress:#5A5044;
  --charcoal:#26292A;
  --charcoal-deep:#1B1E1F;
  --olive:#6B7052;
  --clay:#9A6244;
  --clay-ink:#8A5638;
  --ink:#202425;
  --ink-soft:#585F5C;
  --line:rgba(38,41,42,.14);
  --line-strong:rgba(38,41,42,.26);
  --line-field:rgba(38,41,42,.52);
  --line-light:rgba(244,237,224,.20);

  --sans:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --disp:'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --rail:232px;
  --tabbar:62px;
  --pad:clamp(1rem, 3vw, 2.25rem);
}

*,*::before,*::after{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--sans);
  background:var(--cream);
  color:var(--ink);
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
img{display:block;max-width:100%;}
a{color:inherit;}
h1,h2,h3{margin:0;font-family:var(--disp);font-weight:700;letter-spacing:-.015em;line-height:1.15;}
p{margin:0;}
ul{margin:0;padding:0;list-style:none;}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0;}
[hidden]{display:none !important;}

:focus-visible{outline:2px solid var(--clay);outline-offset:2px;}

.skip{position:absolute;left:-9999px;top:0;background:var(--charcoal);color:var(--cream);padding:.6rem 1rem;z-index:100;}
.skip:focus{left:0;}

.vh{position:absolute !important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}

/* ---------------------------------------------------------------- demo bar */
.demo-bar{
  background:var(--sand);
  color:var(--charcoal);
  font-size:.8rem;
  padding:.45rem var(--pad);
  display:flex;flex-wrap:wrap;gap:.25rem 1rem;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--line-strong);
}
.demo-bar b{font-family:var(--disp);letter-spacing:.12em;text-transform:uppercase;font-size:.68rem;}
.demo-bar button{text-decoration:underline;text-underline-offset:2px;font-size:.8rem;}

/* ---------------------------------------------------------------- shell */
.app{min-height:100vh;display:grid;grid-template-columns:var(--rail) 1fr;}
.rail{
  background:var(--charcoal);
  color:var(--cream);
  position:sticky;top:0;height:100vh;
  display:flex;flex-direction:column;
  padding:1.5rem 0 1.25rem;
}
.brand{display:flex;align-items:center;gap:.7rem;padding:0 1.25rem 1.6rem;text-decoration:none;}
.brand img{width:38px;height:38px;}
.brand span{display:flex;flex-direction:column;line-height:1.1;}
.brand b{font-family:var(--disp);font-size:1.02rem;letter-spacing:-.01em;}
.brand small{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:rgba(244,237,224,.62);margin-top:.2rem;}

.nav a{
  display:flex;align-items:center;justify-content:space-between;
  padding:.72rem 1.25rem;
  color:rgba(244,237,224,.78);
  text-decoration:none;
  font-size:.92rem;
  border-left:3px solid transparent;
}
.nav a:hover{color:var(--cream);background:rgba(244,237,224,.05);}
.nav a[aria-current="page"]{color:var(--cream);border-left-color:var(--clay);background:rgba(244,237,224,.07);}
.count{
  min-width:1.35rem;height:1.35rem;padding:0 .35rem;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--clay);color:var(--cream);
  font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums;
}
.rail-foot{margin-top:auto;padding:0 1.25rem;font-size:.8rem;color:rgba(244,237,224,.6);}
.rail-foot a{color:rgba(244,237,224,.8);}

.main{min-width:0;padding:var(--pad);padding-bottom:calc(var(--pad) + 2rem);}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.6rem;}
.page-head h1{font-size:clamp(1.55rem, 2.6vw, 2.1rem);}
.page-head p{color:var(--cypress);margin-top:.35rem;}
.crumb{display:inline-block;font-size:.82rem;color:var(--cypress);margin-bottom:.4rem;text-decoration:none;}
.crumb:hover{text-decoration:underline;}

/* top bar + tab bar, phone and small tablet */
.topbar{display:none;}
.tabbar{display:none;}

@media (max-width:860px){
  .app{grid-template-columns:1fr;}
  .rail{display:none;}
  .topbar{
    display:flex;align-items:center;justify-content:space-between;
    background:var(--charcoal);color:var(--cream);
    padding:.7rem var(--pad);
    position:sticky;top:0;z-index:20;
  }
  .topbar .brand{padding:0;}
  .topbar .brand img{width:32px;height:32px;}
  .topbar-add{border:1px solid var(--line-light);color:var(--cream);padding:.45rem .8rem;font-size:.85rem;}
  .tabbar{
    display:grid;grid-template-columns:repeat(5,1fr);
    position:fixed;left:0;right:0;bottom:0;z-index:20;
    background:var(--cream-lift);
    border-top:1px solid var(--line-strong);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .tabbar a{
    position:relative;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;
    height:var(--tabbar);
    text-decoration:none;
    font-size:.7rem;font-weight:600;letter-spacing:.01em;
    color:var(--ink-soft);
    border-top:3px solid transparent;
  }
  .tabbar a[aria-current="page"]{color:var(--charcoal);border-top-color:var(--clay);}
  .tabbar svg{width:20px;height:20px;}
  .tabbar .count{position:absolute;top:6px;left:calc(50% + 6px);min-width:1.1rem;height:1.1rem;font-size:.62rem;}
  .main{padding-bottom:calc(var(--tabbar) + 2rem + env(safe-area-inset-bottom));}
}

/* ---------------------------------------------------------------- buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
  min-height:44px;padding:.6rem 1.1rem;
  background:var(--charcoal);color:var(--cream);
  border:1px solid var(--charcoal);
  font-weight:600;font-size:.9rem;
  text-decoration:none;white-space:nowrap;
}
.btn:hover{background:var(--charcoal-deep);}
.btn--line{background:transparent;color:var(--charcoal);border-color:var(--line-field);}
.btn--line:hover{background:var(--cream-lift);border-color:var(--charcoal);}
.btn--clay{background:var(--clay);border-color:var(--clay);}
.btn--clay:hover{background:var(--clay-ink);}
.btn--sm{min-height:36px;padding:.35rem .75rem;font-size:.82rem;}
.btn[disabled]{opacity:.55;cursor:default;}
.link{color:var(--clay-ink);text-decoration:underline;text-underline-offset:2px;font-weight:600;font-size:.88rem;}
.btn-row{display:flex;flex-wrap:wrap;gap:.6rem;}

/* ---------------------------------------------------------------- panels */
.grid{display:grid;gap:1.25rem;}
.grid--2{grid-template-columns:repeat(auto-fit, minmax(min(100%, 360px), 1fr));}
.grid--side{grid-template-columns:minmax(0, 1fr) minmax(0, 380px);align-items:start;}
@media (max-width:1100px){.grid--side{grid-template-columns:minmax(0,1fr);}}

.panel{background:var(--cream-lift);border:1px solid var(--line);}
.panel-head{
  display:flex;align-items:center;justify-content:space-between;gap:.75rem;
  padding:.9rem 1.1rem;border-bottom:1px solid var(--line);
}
.panel-head h2{font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:var(--cypress);}
.panel-body{padding:1.1rem;}
.empty{padding:1.4rem 1.1rem;color:var(--ink-soft);font-size:.9rem;}

.stats{display:grid;grid-template-columns:repeat(4, minmax(0,1fr));border:1px solid var(--line);background:var(--cream-lift);margin-bottom:1.25rem;}
.stat{padding:1rem 1.1rem;border-right:1px solid var(--line);text-decoration:none;display:block;}
.stat:last-child{border-right:0;}
.stat b{display:block;font-family:var(--disp);font-size:1.9rem;line-height:1;font-variant-numeric:tabular-nums;}
.stat span{display:block;font-size:.8rem;color:var(--cypress);margin-top:.45rem;}
.stat--hot b{color:var(--clay-ink);}
/* three across (the Referrals page), phones included */
.stats--3{grid-template-columns:repeat(3, minmax(0,1fr));}
@media (max-width:640px){
  .stats.stats--3{grid-template-columns:repeat(3, minmax(0,1fr));}
  .stats.stats--3 .stat{padding:.8rem .7rem;border-bottom:0;}
  .stats.stats--3 .stat:nth-child(2){border-right:1px solid var(--line);}
  .stats--3 .stat b{font-size:1.5rem;}
}
a.stat:hover{background:var(--cream);}
@media (max-width:640px){
  .stats{grid-template-columns:repeat(2, minmax(0,1fr));}
  .stat:nth-child(2){border-right:0;}
  .stat:nth-child(-n+2){border-bottom:1px solid var(--line);}
}

/* ---------------------------------------------------------------- rows */
.rows > li{border-bottom:1px solid var(--line);}
.rows > li:last-child{border-bottom:0;}
.row{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.9rem;align-items:center;
  padding:.85rem 1.1rem;text-decoration:none;
}
a.row:hover, button.row:hover{background:var(--cream);}
button.row{width:100%;text-align:left;}
.row-main{min-width:0;}
.row-title{font-weight:600;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.row-sub{display:block;font-size:.84rem;color:var(--ink-soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.row-side{display:flex;align-items:center;gap:.5rem;justify-content:flex-end;}
.row--noside{grid-template-columns:auto minmax(0,1fr);}
@media (max-width:520px){
  .row{gap:.7rem;padding-inline:.85rem;}
  .row-sub{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
  .row-side .small{display:none;}
}

.datebox{
  width:3.1rem;text-align:center;border:1px solid var(--line-strong);background:var(--cream);
  line-height:1;padding:.4rem 0;
}
.datebox small{display:block;font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;color:var(--cypress);}
.datebox b{display:block;font-family:var(--disp);font-size:1.25rem;margin-top:.2rem;}
.datebox--tba b{font-size:.75rem;font-family:var(--sans);font-weight:600;padding:.25rem 0;}

.dot{width:.55rem;height:.55rem;background:var(--clay);display:inline-block;flex:none;}
.dot--off{background:transparent;}

.group-label{
  font-family:var(--disp);font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:var(--cypress);
  padding:.8rem 1.1rem .5rem;background:var(--cream);border-bottom:1px solid var(--line);
}

/* status labels: text first, colour second */
.tag{
  display:inline-flex;align-items:center;gap:.35rem;
  font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  padding:.2rem .45rem;border:1px solid var(--line-strong);color:var(--cypress);white-space:nowrap;
}
.tag::before{content:"";width:.45rem;height:.45rem;background:currentColor;}
.tag--new, .tag--issue{color:var(--clay-ink);border-color:rgba(154,98,68,.5);}
.tag--completed, .tag--active{color:var(--olive);border-color:rgba(107,112,82,.5);}
.tag--scheduled, .tag--reviewing, .tag--update{color:var(--charcoal);}
.tag--skipped, .tag--canceled, .tag--declined, .tag--paused{color:var(--ink-soft);}

/* ---------------------------------------------------------------- filters */
.filters{display:flex;gap:0;border:1px solid var(--line-strong);width:max-content;max-width:100%;overflow-x:auto;margin-bottom:1rem;}
.filters button{padding:.5rem .9rem;font-size:.85rem;font-weight:600;color:var(--cypress);border-right:1px solid var(--line-strong);white-space:nowrap;}
.filters button:last-child{border-right:0;}
.filters button[aria-pressed="true"]{background:var(--charcoal);color:var(--cream);}

.search{width:100%;max-width:420px;margin-bottom:1rem;}

/* ---------------------------------------------------------------- forms */
.field{display:block;margin-bottom:1rem;}
.field > span{display:block;font-size:.82rem;font-weight:600;margin-bottom:.35rem;}
.field small{display:block;font-size:.78rem;color:var(--ink-soft);margin-top:.3rem;}
.input, .field input:not([type=checkbox]):not([type=file]), .field select, .field textarea{
  width:100%;
  font:inherit;font-size:16px; /* 16px stops iOS zooming on focus */
  color:var(--ink);
  background:#fff;
  border:1px solid var(--line-field);
  border-radius:0;
  padding:.6rem .7rem;
  min-height:44px;
}
.field textarea{min-height:96px;resize:vertical;}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus{outline:2px solid var(--clay);outline-offset:0;border-color:var(--charcoal);}
.fields-2{display:grid;grid-template-columns:1fr 1fr;gap:0 1rem;}
@media (max-width:520px){.fields-2{grid-template-columns:1fr;}}
.check{display:flex;gap:.6rem;align-items:flex-start;font-size:.9rem;margin-bottom:1rem;}
.check input{width:1.1rem;height:1.1rem;margin-top:.15rem;accent-color:var(--charcoal);}
.err{color:var(--clay-ink);font-size:.85rem;font-weight:600;margin-bottom:1rem;}

.file-pick{
  display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;
  border:1px dashed var(--line-field);padding:.75rem;background:#fff;
}
.file-pick input{font-size:.85rem;max-width:100%;}

/* ---------------------------------------------------------------- definition list */
.dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.55rem 1.1rem;font-size:.92rem;}
.dl dt{color:var(--cypress);font-size:.82rem;padding-top:.08rem;}
.dl dd{margin:0;overflow-wrap:anywhere;}

/* ---------------------------------------------------------------- thread */
.thread{display:flex;flex-direction:column;gap:.9rem;padding:1.1rem;max-height:560px;overflow-y:auto;}
.msg{max-width:min(88%, 560px);}
.msg-meta{font-size:.74rem;color:var(--ink-soft);margin-bottom:.25rem;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;}
.msg-body{padding:.7rem .85rem;background:#fff;border:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;}
.msg--out{align-self:flex-end;}
.msg--out .msg-meta{justify-content:flex-end;}
.msg--out .msg-body{background:var(--charcoal);color:var(--cream);border-color:var(--charcoal);}
.msg--issue .msg-body{border-left:4px solid var(--clay);}
.msg--out.msg--issue .msg-body{border-left-color:var(--clay);}
.msg--completed .msg-body{border-left:4px solid var(--olive);}
.msg-photos{display:grid;grid-template-columns:repeat(auto-fill, minmax(96px,1fr));gap:.4rem;margin-top:.45rem;}
.composer{border-top:1px solid var(--line);padding:1rem 1.1rem;}
.composer textarea{min-height:76px;}
.composer-foot{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;justify-content:space-between;}
.kind-pick{display:flex;flex-wrap:wrap;gap:0;border:1px solid var(--line-strong);}
.kind-pick label{display:flex;align-items:center;font-size:.8rem;font-weight:600;color:var(--cypress);cursor:pointer;border-right:1px solid var(--line-strong);}
.kind-pick label:last-child{border-right:0;}
.kind-pick input{position:absolute;opacity:0;width:1px;height:1px;}
.kind-pick span{padding:.45rem .7rem;}
.kind-pick input:checked + span{background:var(--charcoal);color:var(--cream);}
.kind-pick input:focus-visible + span{outline:2px solid var(--clay);outline-offset:-2px;}

/* ---------------------------------------------------------------- photos */
.photos{display:grid;grid-template-columns:repeat(auto-fill, minmax(120px,1fr));gap:.5rem;}
.photo{position:relative;display:block;aspect-ratio:1;background:var(--sand);overflow:hidden;border:0;padding:0;width:100%;}
.photo img{width:100%;height:100%;object-fit:cover;}
.photo .tag{position:absolute;left:.35rem;bottom:.35rem;background:var(--cream-lift);font-size:.6rem;padding:.1rem .3rem;}
.thumbs{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.5rem;}
.thumbs img{width:56px;height:56px;object-fit:cover;border:1px solid var(--line);}

/* ---------------------------------------------------------------- modal */
.modal{border:0;padding:0;background:var(--cream);color:var(--ink);width:min(560px, calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto;}
.modal::backdrop{background:rgba(27,30,31,.55);}
.modal-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--cream);z-index:1;}
.modal-head h2{font-size:1.15rem;}
.modal-x{width:40px;height:40px;font-size:1.5rem;line-height:1;color:var(--cypress);}
.modal-body{padding:1.25rem;}
.modal-foot{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:flex-end;padding:1rem 1.25rem;border-top:1px solid var(--line);background:var(--cream-lift);position:sticky;bottom:0;}
@media (max-width:560px){
  .modal{width:100vw;max-width:100vw;height:100%;max-height:100%;margin:0;}
}
.lightbox{background:var(--charcoal-deep);width:min(1000px, calc(100vw - 2rem));}
.lightbox img{width:100%;max-height:80vh;object-fit:contain;}
.lightbox .modal-head{background:var(--charcoal-deep);color:var(--cream);border-color:var(--line-light);}
.lightbox .modal-x{color:var(--cream);}

/* ---------------------------------------------------------------- toast */
.toast{
  position:fixed;left:50%;transform:translateX(-50%);bottom:1.5rem;z-index:200;
  background:var(--charcoal);color:var(--cream);padding:.75rem 1.1rem;font-size:.9rem;
  max-width:calc(100vw - 2rem);
}
@media (max-width:860px){.toast{bottom:calc(var(--tabbar) + 1rem + env(safe-area-inset-bottom));}}

.muted{color:var(--ink-soft);}
.small{font-size:.84rem;}
.stack > * + *{margin-top:1.25rem;}
.nowrap{white-space:nowrap;}

/* ==========================================================================
   Customer portal. Lighter than the admin: a top bar on desktop, the same
   tab bar on phones, one narrow column, bigger type for the things a
   customer came to check (next visit, latest update).
   ========================================================================== */
.demo-tools{display:flex;flex-wrap:wrap;gap:.4rem .9rem;align-items:center;}
.demo-tools select{font:inherit;font-size:.8rem;padding:.15rem .3rem;border:1px solid var(--line-field);background:var(--cream-lift);border-radius:0;}
.demo-tools a, .demo-tools button{font-size:.8rem;text-decoration:underline;text-underline-offset:2px;}

.ptop{background:var(--charcoal);color:var(--cream);position:sticky;top:0;z-index:20;}
.ptop-in{max-width:960px;margin:0 auto;padding:.75rem var(--pad);display:flex;align-items:center;justify-content:space-between;gap:1rem;}
.ptop .brand{padding:0;}
@media (max-width:860px){
  .ptop .brand img{width:32px;height:32px;}
}

/* Side menu, signed in, from 861px. Same dark rail as admin (.nav, .count
   and .rail-foot rules are shared); below 861px the tab bar takes over and
   the rail never shows. .is-in is set on .pshell once someone is signed in
   to an account. */
.prail{display:none;}
@media (min-width:861px){
  .pshell.is-in{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh;}
  .pshell.is-in .ptop{display:none;}
  .pshell.is-in .prail:not([hidden]){
    display:flex;flex-direction:column;
    background:var(--charcoal);color:var(--cream);
    position:sticky;top:0;height:100vh;overflow-y:auto;
    padding:1.5rem 0 1.25rem;
  }
  .pshell.is-in .pmain{margin:0;max-width:960px;}
}
.prail .brand{padding:0 1.25rem .9rem;}
.prail-who{padding:0 1.25rem 1.1rem;margin-bottom:.4rem;border-bottom:1px solid var(--line-light);font-size:.84rem;color:rgba(244,237,224,.72);overflow-wrap:anywhere;}
.prail-h{
  font-family:var(--disp);font-size:.64rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;
  color:rgba(244,237,224,.5);padding:1.3rem 1.25rem .45rem;
}
.prail-link{
  display:block;padding:.5rem 1.25rem;font-size:.86rem;text-decoration:none;
  color:rgba(244,237,224,.78);border-left:3px solid transparent;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.prail-link:hover{color:var(--cream);background:rgba(244,237,224,.05);}
.prail-link[aria-current="page"]{color:var(--cream);border-left-color:var(--clay);background:rgba(244,237,224,.07);}
.prail-out{font-size:.84rem;color:rgba(244,237,224,.8);text-decoration:underline;text-underline-offset:2px;}

.pmain{max-width:960px;margin:0 auto;padding:var(--pad);padding-bottom:calc(var(--pad) + 2rem);}
@media (max-width:860px){.pmain{padding-bottom:calc(var(--tabbar) + 2rem + env(safe-area-inset-bottom));}}

.hello{margin-bottom:1.5rem;}
.hello h1{font-size:clamp(1.6rem, 3vw, 2.2rem);}
.hello p{color:var(--cypress);margin-top:.35rem;}

/* next visit: the one thing most visits to the portal are for */
.next{background:var(--charcoal);color:var(--cream);padding:1.4rem 1.4rem 1.3rem;margin-bottom:1.25rem;}
.next .eyebrow{font-family:var(--disp);font-size:.68rem;letter-spacing:.2em;text-transform:uppercase;color:rgba(244,237,224,.62);}
.next h2{font-size:clamp(1.45rem, 3vw, 1.95rem);margin:.5rem 0 .35rem;}
.next p{color:rgba(244,237,224,.8);}
.next .next-note{margin-top:.8rem;padding-top:.8rem;border-top:1px solid var(--line-light);}
.next-meta{display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;margin-top:.6rem;font-size:.9rem;}
.next-meta b{color:var(--cream);font-weight:600;}
.next--none{background:var(--cream-lift);color:var(--ink);border:1px solid var(--line);}
.next--none .eyebrow{color:var(--cypress);}
.next--none p{color:var(--cypress);}

.do{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));border:1px solid var(--line);background:var(--cream-lift);margin-bottom:1.25rem;}
.do a{display:block;padding:1rem 1.1rem;text-decoration:none;border-right:1px solid var(--line);}
.do a:last-child{border-right:0;}
.do a:hover{background:var(--cream);}
.do b{display:block;font-family:var(--disp);font-size:1.02rem;}
.do span{display:block;font-size:.84rem;color:var(--cypress);margin-top:.2rem;}
@media (max-width:640px){
  .do{grid-template-columns:1fr;}
  .do a{border-right:0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto;column-gap:1rem;align-items:center;}
  .do b, .do span{grid-column:1;}
  .do a::after{content:"→";color:var(--cypress);grid-column:2;grid-row:1 / span 2;}
  .do a:last-child{border-bottom:0;}
}

.visit-card{padding:1.1rem;border-bottom:1px solid var(--line);}
.visit-card:last-child{border-bottom:0;}
.visit-top{display:flex;gap:.9rem;align-items:flex-start;}
.visit-top .row-main{flex:1;}
.visit-card .msg-body{margin-top:.75rem;}

.signin{max-width:440px;margin:clamp(1.5rem, 6vh, 4rem) auto;}
.signin h1{font-size:clamp(1.6rem, 3vw, 2.1rem);margin-bottom:.5rem;}
.signin > p{color:var(--cypress);margin-bottom:1.5rem;}
.signin .panel-body{padding:1.4rem;}
.signin .btn{width:100%;}
.signin-help{font-size:.86rem;color:var(--ink-soft);margin-top:1.25rem;}
.signin-help a{color:var(--clay-ink);font-weight:600;}
.code-input{letter-spacing:.4em;font-variant-numeric:tabular-nums;font-size:1.25rem !important;text-align:center;}

.done-box{text-align:left;padding:1.5rem 1.4rem;}
.done-box h2{font-size:1.4rem;margin-bottom:.5rem;}
.done-box p{color:var(--cypress);margin-bottom:1rem;}

.fine{font-size:.82rem;color:var(--ink-soft);}
/* rows a customer reads in full (their property, access notes, plans) */
.rows--full .row-title, .rows--full .row-sub{white-space:normal;overflow:visible;display:block;-webkit-line-clamp:unset;}

/* admin, signed out: just the sign-in form */
.app.is-out{grid-template-columns:1fr;}
.app.is-out .rail, .app.is-out .tabbar, .app.is-out .topbar-add{display:none;}
/* rows with a status tag: on a narrow phone the tag drops under the text
   instead of squeezing it into a sliver */
@media (max-width:520px){
  .rows--stack .row{grid-template-columns:auto minmax(0,1fr);}
  .rows--stack .row-side{grid-column:2;justify-content:flex-start;}
}

/* ==========================================================================
   Service report (report.js). On screen: controls, then the report as a
   white sheet. Printed: the sheet alone, black on white, photos kept with
   their visit.
   ========================================================================== */
.report-controls{background:var(--cream-lift);border:1px solid var(--line);padding:1.1rem;margin-bottom:1.25rem;}
.report-pickers, .report-dates{display:grid;grid-template-columns:repeat(auto-fit, minmax(min(100%, 220px), 1fr));gap:0 1rem;}
.report-controls .fine{margin-top:.6rem;}

.report{background:#fff;color:#202425;border:1px solid var(--line);padding:clamp(1.1rem, 4vw, 2.5rem);}
.report-head{display:flex;gap:1.25rem;align-items:flex-start;padding-bottom:1rem;border-bottom:2px solid var(--charcoal);}
.report-logo{width:112px;height:auto;flex:none;}
.report-head h1{font-size:clamp(1.4rem, 3vw, 1.9rem);margin-bottom:.35rem;}
.report-head p{font-size:.92rem;color:var(--cypress);}
.report-head p b{color:var(--ink);}
.report-summary{margin:1rem 0 1.25rem;font-weight:600;}
.report-empty{color:var(--ink-soft);}
.report-prop{margin-top:1.5rem;}
.report-prop:first-child{margin-top:0;}
.report-prop h2, .report-issues h2{font-size:1.05rem;padding-bottom:.35rem;border-bottom:1px solid var(--line-strong);}
.report-meta{font-size:.84rem;color:var(--cypress);margin:.3rem 0 .4rem;}
.rv, .ri{padding:.75rem 0;border-bottom:1px solid var(--line);break-inside:avoid;page-break-inside:avoid;}
.rv-head{display:grid;grid-template-columns:auto 1fr auto;gap:.3rem 1rem;align-items:baseline;}
.rv-date{font-size:.84rem;color:var(--cypress);white-space:nowrap;}
.rv-svc{font-weight:600;}
.rv-price{font-variant-numeric:tabular-nums;}
.rv-note{margin-top:.35rem;font-size:.92rem;white-space:pre-wrap;overflow-wrap:anywhere;}
.rv-photos{display:grid;grid-template-columns:repeat(auto-fill, minmax(110px, 1fr));gap:.4rem;margin-top:.5rem;}
.rv-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid var(--line);}
.report-issues{margin-top:1.75rem;}
.report-foot{margin-top:1.75rem;padding-top:.9rem;border-top:1px solid var(--line-strong);font-size:.78rem;color:var(--ink-soft);}
.report-foot p + p{margin-top:.35rem;}
@media (max-width:520px){
  .report-head{flex-direction:column;gap:.75rem;}
  .rv-head{grid-template-columns:1fr auto;}
  .rv-date{grid-column:1 / -1;}
}

@media print{
  @page{margin:14mm;}
  html, body{background:#fff !important;}
  .demo-bar, .ptop, .tabbar, .rail, .topbar, .skip, .crumb, .toast, .report-controls, .hello{display:none !important;}
  .app{display:block;}
  .main, .pmain{padding:0 !important;max-width:none;}
  .report{border:0;padding:0;}
  .rv-photos{grid-template-columns:repeat(4, 1fr);}
  a{color:inherit;text-decoration:none;}
}

/* Service report, large photos (the default): one to a row on a phone, as
   wide as fits on a screen, two to a row on paper. A visit with several
   large photos may run onto the next page; a single photo never splits. */
.rv-photos--large{grid-template-columns:repeat(auto-fill, minmax(min(100%, 260px), 1fr));gap:.6rem;}
.rv-photos img{break-inside:avoid;page-break-inside:avoid;}
@media print{
  .rv-photos--large{grid-template-columns:repeat(2, 1fr);gap:4mm;}
  .rv:has(.rv-photos--large){break-inside:auto;page-break-inside:auto;}
}

/* PO / work-order number beside the service on a service report */
.rv-po{font-weight:400;color:var(--cypress);}

/* Admin top bar on phones: Scout and + Visit side by side */
.topbar-btns{display:flex;gap:.4rem;}

/* Scout: the parcel found at a spot, and the nearby-parcel picker */
.scout-card{background:#fff;border:1px solid var(--line);padding:.85rem .95rem;}
.scout-near{margin-top:.75rem;}
.scout-near summary{cursor:pointer;font-size:.88rem;font-weight:600;color:var(--clay-ink);padding:.35rem 0;}
.scout-pick{flex-direction:column;margin-top:.5rem;}
.scout-pick label{border-right:0;border-bottom:1px solid var(--line-strong);}
.scout-pick label:last-child{border-bottom:0;}
.scout-pick span{display:block;width:100%;padding:.6rem .75rem;}

/* Scout "Find leads" */
.find-h{display:block;font-size:.82rem;font-weight:600;margin:.9rem 0 .35rem;}
.find-towns{display:grid;grid-template-columns:repeat(auto-fill, minmax(140px, 1fr));gap:0 1rem;}
.find-towns .check{margin-bottom:.45rem;}
.find-list{border:1px solid var(--line);background:var(--cream-lift);}

/* three fields in a row (Find leads: smallest lot, largest lot, how many) */
.fields-3{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:0 1rem;}
@media (max-width:520px){.fields-3{grid-template-columns:1fr;}}

/* Scout on the admin Today page: sits between the counts and the lists */
.scout-today{margin-bottom:1.25rem;}

/* Scout lead sheet: county records link and the code-case box */
.code-check{border:1px solid var(--line);background:#fff;padding:.75rem .9rem;}

/* sign in with Face ID (signin.js): first on a device that has it, else under the form */
/* referrals and credit (portal Account, admin customer page) */
.refer-card{border:1px solid var(--line);border-top:3px solid var(--clay);background:var(--cream-lift);padding:1rem 1.1rem;margin:0 0 1.25rem;}
.refer-card h2{font-family:var(--disp);font-size:1.25rem;margin:0 0 .35rem;}
.refer-card p{margin:0;}
.credit-note{background:var(--cream-lift);border-left:3px solid var(--clay);padding:.65rem .9rem;margin:0 0 1rem;}
.ref-link .input{font-size:.9rem;}
.ref-credit{margin-top:1rem;border-top:1px solid var(--line);padding-top:.75rem;}
.ref-credit ul, .plain-list{list-style:none;margin:0;padding:0;font-size:.9rem;}
.ref-credit li, .plain-list li{padding:.2rem 0;}
.stack-sm > * + *{margin-top:.5rem;}

/* Scout list: stage tabs with counts, then Show / Group by owner / Select */
.scout-tabs{margin-bottom:.75rem;}
.tab-count{display:inline-block;margin-left:.45rem;min-width:1.4rem;padding:0 .3rem;font-size:.75rem;line-height:1.35rem;text-align:center;background:var(--sand);color:var(--charcoal);}
.filters button[aria-pressed="true"] .tab-count{background:var(--cream);color:var(--charcoal);}
/* phones: all five tabs in view, three over two, no sideways scroll */
@media (max-width:600px){
  .scout-tabs{display:grid;grid-template-columns:repeat(3,1fr);width:100%;overflow:visible;border-width:1px 0 0 1px;}
  .scout-tabs button, .scout-tabs button:last-child{border-right:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);padding:.55rem .25rem;text-align:center;font-size:.8rem;min-width:0;white-space:normal;line-height:1.5;}
  .scout-tabs .tab-count{margin-left:.3rem;}
  .scout-tabs button:last-child{grid-column:span 2;}
  .scout-tools select{flex:1 1 100%;}
}
.scout-tools{display:flex;flex-wrap:wrap;gap:.6rem 1.1rem;align-items:center;margin-bottom:1rem;}
.scout-tools select{width:auto;min-width:12rem;}
.scout-tools .check{margin:0;}

/* a Scout lead's activity log (scout.js) */
.activity{border:1px solid var(--line);background:#fff;padding:.75rem .9rem;}
.activity-sum{font-weight:600;margin:.1rem 0 .4rem;}
.activity-list{list-style:none;margin:0;padding:0;}
.activity-list li{display:grid;grid-template-columns:3.6rem minmax(0,1fr) auto;gap:.6rem;align-items:baseline;padding:.4rem 0;border-top:1px solid var(--line);font-size:.9rem;}
.activity-list li:first-child{border-top:0;}
.activity-date{color:var(--ink-soft);font-size:.82rem;}

.signin-face{display:grid;gap:.5rem;justify-items:start;margin-bottom:1rem;}
.signin-face--after{margin:1.1rem 0 0;padding-top:1rem;border-top:1px solid var(--line);}

/* a Scout lead's photos: tap to enlarge, Remove under each */
.scout-photos{display:grid;grid-template-columns:repeat(auto-fill, minmax(110px,1fr));gap:.6rem;}
.scout-photos figure{margin:0;display:grid;gap:.25rem;justify-items:start;}
.scout-photos .photo{aspect-ratio:4/3;}
/* Outreach: tick the photos to send */
.pick-photo{cursor:pointer;}
.pick-photo input{position:absolute;top:.4rem;left:.4rem;width:1.25rem;height:1.25rem;accent-color:var(--charcoal);}

/* people behind a Scout lead */
.contact-list{list-style:none;margin:.4rem 0 0;padding:0;}
.contact-list li{border:1px solid var(--line);background:#fff;padding:.6rem .8rem;margin-bottom:.5rem;}
.contact-list p{margin:0;}

/* Scout map (map.js) */
.map-tools{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;justify-content:space-between;margin-bottom:.75rem;}
.map-tools .filters{margin-bottom:0;}
.map-banner{border:1px solid var(--line);border-bottom:0;background:var(--cream-lift);padding:.65rem .9rem;font-size:.9rem;}
.map-banner .btn-row{margin-top:.35rem;gap:1.2rem;}
.scout-map{height:60vh;min-height:280px;border:1px solid var(--line-strong);background:var(--sand, #e8dfcf);}
.scout-map .leaflet-tooltip{font:600 .8rem/1.3 Inter, system-ui, sans-serif;border-radius:0;}


/* Scout bulk actions: a checkbox in front of each row, and a bar that
   stays in view at the bottom (above the phone tab bar) */
.row-pick{display:flex;align-items:stretch;}
.row-pick > .row{flex:1;min-width:0;}
.pick{display:flex;align-items:center;padding-left:1.1rem;cursor:pointer;}
.pick input{width:1.15rem;height:1.15rem;accent-color:var(--charcoal);}
.bulk-bar{
  position:sticky;bottom:0;z-index:5;margin-top:1rem;
  background:var(--cream-lift);border:1px solid var(--line-strong);
  padding:.75rem 1rem;display:grid;gap:.6rem;
}
.bulk-top{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;font-weight:600;font-size:.9rem;}
.bulk-acts{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;}
.bulk-acts select{width:auto;min-width:9rem;}
@media (max-width:860px){
  .bulk-bar{bottom:calc(var(--tabbar) + env(safe-area-inset-bottom));}
  .pick{padding-left:.85rem;}
}
