/* FieldDesk look: loaded after each page's own styles. Fonts ship with the app (no outside request, works with no signal). */
@font-face{font-family:Barlow;font-weight:400;font-display:swap;src:url(/fonts/barlow-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:Barlow;font-weight:500;font-display:swap;src:url(/fonts/barlow-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:Barlow;font-weight:600;font-display:swap;src:url(/fonts/barlow-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:Barlow;font-weight:700;font-display:swap;src:url(/fonts/barlow-latin-700-normal.woff2) format('woff2')}
@font-face{font-family:'Barlow Condensed';font-weight:600;font-display:swap;src:url(/fonts/barlow-condensed-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:'Barlow Condensed';font-weight:700;font-display:swap;src:url(/fonts/barlow-condensed-latin-700-normal.woff2) format('woff2')}

:root{--bg:#eceee8;--line:#d5dad2;--lift:0 1px 2px rgba(22,44,33,.06),0 8px 18px -10px rgba(22,44,33,.18);--hd:#1f3d2f;--hdt:#f4f7f4;--hdm:#bdd1c4}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#0f1512;--line:#2a3630;--lift:none;--hd:#16261e}}
:root[data-theme="dark"]{--bg:#0f1512;--line:#2a3630;--lift:none;--hd:#16261e}

body{font-family:Barlow,system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent}
h1,h2,h3{font-family:'Barlow Condensed',Barlow,system-ui,sans-serif;font-weight:700;letter-spacing:0}

/* the top bar: deep green with a gold rule, like the sign on the truck */
header{background:var(--hd);color:var(--hdt);border-bottom:3px solid var(--gold);padding:13px 16px;box-shadow:0 2px 10px -4px rgba(0,0,0,.35)}
header::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:env(safe-area-inset-top,0px);background:var(--hd)}
header #crumb,header b{font-family:'Barlow Condensed',Barlow,sans-serif;font-weight:600;font-size:1.3rem;line-height:1.1;letter-spacing:.01em;color:var(--hdt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
header #mbtn{color:var(--hdt);min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;margin:-8px 0 -8px -8px;border-radius:10px}
header #mbtn:active{background:rgba(255,255,255,.12)}
header .mut,header a,header #cloudst{color:var(--hdm)}

/* cards lift off the page a little; cards inside cards stay flat */
.card{border-radius:14px;box-shadow:var(--lift)}
.card .card,.box .card,dialog .card{box-shadow:none;border-radius:11px}
.box{border-radius:14px}
.jlog{border-radius:14px;box-shadow:var(--lift)}
.proj:active,.gopt:active{transform:scale(.995)}

/* buttons: thumb-sized, firmer */
.btn{border-radius:10px;min-height:44px;font-weight:600;letter-spacing:.005em;transition:transform .06s,filter .12s}
.btn:not(.o){box-shadow:0 1px 2px rgba(22,44,33,.28)}
.btn.o{background:var(--card)}
.btn:active:not(:disabled){transform:translateY(1px);filter:brightness(.94)}
.stab{min-height:36px}
a.btn{text-decoration:none;display:inline-block;line-height:22px}
.xb{background:var(--card)}

/* tabs */
.tab{padding:12px 1px;font-weight:600}
.tab[aria-selected=true]{border-color:var(--gold)}

/* fields */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea{font-size:16px;border-radius:10px;border-color:var(--line)}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus,select:focus,textarea:focus{border-color:var(--g);box-shadow:0 0 0 3px var(--gl);outline:0}
input[type=checkbox],input[type=radio]{accent-color:var(--gbtn)}
label{font-weight:600}

.stat b{letter-spacing:0;font-variant-numeric:tabular-nums}
.pill{border-radius:999px;padding:5px 12px}
.badge{border-radius:999px}
.bar{height:9px;border-radius:999px}.bar i{border-radius:999px}
.line{padding:12px 0}

dialog{border-radius:18px;border-color:transparent;box-shadow:0 24px 60px -12px rgba(0,0,0,.45)}
dialog::backdrop{background:rgba(12,24,18,.55)}
dialog h2{font-size:1.6rem}

/* menu: same green band on top, gold marks where you are */
#menu nav{padding-top:0;box-shadow:6px 0 30px rgba(0,0,0,.28)}
#menu .mh{background:var(--hd);color:var(--hdt);border-bottom:3px solid var(--gold);padding:calc(env(safe-area-inset-top,0px) + 16px) 16px 14px 18px}
#menu .mh b{font-family:'Barlow Condensed',Barlow,sans-serif;font-size:1.55rem;font-weight:700;letter-spacing:.01em;color:var(--hdt)}
#menu .mh small{color:var(--hdm);letter-spacing:.12em;font-weight:600}
#menu .mh .xb,#menu .mh button{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.22);color:var(--hdt)}
#menu a.mi{min-height:46px;border-left-width:4px;font-weight:500}
#menu a.mi[aria-current="page"]{border-left-color:var(--gold);font-weight:700}
#menu details.mg>summary{min-height:52px}
#menu .ct{border-radius:999px}

/* sign-in */
.gbrand b{font-family:'Barlow Condensed',Barlow,sans-serif;font-size:2.1rem;font-weight:700;line-height:1}
.gbrand{border-left:4px solid var(--gold);padding-left:12px}
.gbtn{box-shadow:0 1px 2px rgba(22,44,33,.28)}
.gopt{border-radius:14px;box-shadow:var(--lift)}

@media (prefers-reduced-motion:reduce){.btn,.proj,.gopt{transition:none;transform:none!important}}
@media print{header{box-shadow:none}.card,.jlog{box-shadow:none}}

/* basic plan (jobs, schedule, clock-in): no money on the job page */
body.lite .ltx,body.lite .ltx+div[style*="margin:12px 0 4px"]{display:none!important}
body.lite .proj .ft span:last-child:not(:first-child){visibility:hidden}
body.lite .nolite{display:none!important}

/* ---------- Desktop: the menu stays open beside the page and the page uses the width ---------- */
@media (min-width: 1100px) {
  :root { --side: 266px; }
  body.deskmenu header { margin-left: var(--side); }
  header { padding: 11px 26px; }
  body.deskmenu header #mbtn { display: none; }
  header #crumb, header b { font-size: 1.22rem; }
  body.deskmenu main { margin-left: var(--side); }
  main { max-width: 1180px; padding: 22px 30px 70px; }

  body.deskmenu #menu { display: block; position: static; }
  body.deskmenu #menu .bd { display: none; }
  body.deskmenu #menu nav { position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); box-shadow: none; border-right: 1px solid var(--line); overflow-y: auto; }
  body.deskmenu #menu .mh .xb { display: none; }
  #menu .mh { padding-top: 18px; padding-bottom: 12px; }
  #menu a.mi { min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: .95rem; }
  #menu details.mg > summary { min-height: 44px; padding-top: 10px; padding-bottom: 10px; font-size: .95rem; }

  /* four across instead of two, and tighter cards */
  .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .card { padding: 18px 20px; }
  .stat b { font-size: 1.6rem !important; }
  h1 { font-size: 2rem; }
  .sec h2, main h2 { font-size: 1.5rem; }
  .proj h3 { font-size: 1.6rem; }

  /* job pages: wide content, roomier tabs */
  .tabs.jtabs { gap: 30px; justify-content: flex-start; }
  .jtabs .tab { font-size: 1rem; }
  .subtabs { gap: 8px; }

  /* lists of jobs read better in two columns */
  .jobcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .jobcols .proj { margin-bottom: 0; }

  .jc-bars { justify-content: flex-start; gap: 14px; }
  .jc-col { flex: 0 0 56px; }
  dialog { width: min(620px, 92vw); }
  .acts .btn { min-width: 150px; }

  /* the crew and foreman screens stay a phone-width column, centred */
  body.deskmenu.rvmode main { margin-left: var(--side); }
  .rvwrap { max-width: 720px; margin: 0 auto; }
}
@media (min-width: 1500px) {
  main { max-width: 1340px; }
  .jobcols { grid-template-columns: repeat(3, 1fr); }
}
