/* Gaffcheck UI r60ui: design tokens + components (redesign 2026-11-28). Loaded after app.css on every page.
   Themes: light (default), dark (system or chosen), sun (high-contrast outdoors). All text/background pairs meet WCAG AA (4.5:1). */
:root{
  --gc-primary:#C2410C;--gc-on-primary:#fff;--gc-bg:#F4F5F7;--gc-surface:#fff;--gc-surface-2:#F8F9FB;--gc-text:#1B1B1F;--gc-muted:#5B6170;--gc-line:#D8DBE2;
  --gc-header:#28272C;--gc-on-header:#fff;--gc-brand:#FC5104;--gc-focus:#2563EB;
  --gc-ok:#166534;--gc-ok-bg:#E8F5EE;--gc-pend:#92400E;--gc-pend-bg:#FEF3C7;--gc-danger:#B91C1C;--gc-danger-bg:#FDECEC;--gc-info:#1E40AF;--gc-info-bg:#EAF0FE;
  --gc-r1:8px;--gc-r2:12px;--gc-shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08);--gc-tab-h:64px;
  --gc-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  /* legacy variables used across app.css now point at the tokens */
  --bg:var(--gc-bg);--card:var(--gc-surface);--muted:var(--gc-muted);--line:var(--gc-line);--ok:var(--gc-ok);--warn:var(--gc-pend);
  color-scheme:light;
}
html[data-theme="dark"]{
  --gc-primary:#FF8A4C;--gc-on-primary:#121214;--gc-bg:#121214;--gc-surface:#1E1E22;--gc-surface-2:#26262B;--gc-text:#F2F2F4;--gc-muted:#B4B8C2;--gc-line:#3A3A42;
  --gc-header:#1A1A1E;--gc-ok:#7EE2A8;--gc-ok-bg:#163322;--gc-pend:#FCD34D;--gc-pend-bg:#3A2E10;--gc-danger:#FCA5A5;--gc-danger-bg:#3B1515;--gc-info:#A5C0FF;--gc-info-bg:#18223D;--gc-focus:#93B4FF;
  --gc-shadow:none;color-scheme:dark;
}
html[data-theme="sun"]{
  --gc-primary:#9A3412;--gc-on-primary:#fff;--gc-bg:#fff;--gc-surface:#fff;--gc-surface-2:#fff;--gc-text:#000;--gc-muted:#1F2937;--gc-line:#000;--gc-header:#000;
  --gc-ok:#14532D;--gc-ok-bg:#fff;--gc-pend:#78350F;--gc-pend-bg:#fff;--gc-danger:#991B1B;--gc-danger-bg:#fff;--gc-shadow:none;
}
html[data-theme="sun"] .card,html[data-theme="sun"] .gc-tabbar,html[data-theme="sun"] input,html[data-theme="sun"] select,html[data-theme="sun"] textarea,html[data-theme="sun"] .btn.ghost,html[data-theme="sun"] .gc-pill{border-width:2px!important;border-color:#000!important}
html[data-theme="sun"] body{font-weight:500}

/* base */
body{font-family:var(--gc-font);background:var(--gc-bg)!important;color:var(--gc-text);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
@media (min-width:900px){html{font-size:17px}}
a{color:var(--gc-primary)}
body.gc-platform-page a{color:var(--gc-primary)}
:focus-visible{outline:3px solid var(--gc-focus)!important;outline-offset:2px}
h1{font-size:28px;line-height:1.2;font-weight:800;letter-spacing:-.01em;margin:0 0 8px}
h2{font-size:20px;line-height:1.3;font-weight:700;margin:0 0 8px}
.card h3,body.gc-platform-page .card h3{font-size:17px;line-height:1.35;font-weight:700;color:var(--gc-text);margin:0 0 8px}
.note,.tiny{color:var(--gc-muted)!important;font-size:13px;line-height:1.45}
.tiny{margin-top:6px}

/* header: flat charcoal, brand orange only as accent */
.appbar,.appbar.gc-platform{background:var(--gc-header)!important;color:var(--gc-on-header)!important;border-bottom:3px solid var(--gc-brand)}
.appbar.gc-platform .brand{color:var(--gc-brand)}
.appbar.tenant{background:var(--blue)!important;border-bottom:4px solid var(--red)}
.appbar h1,.appbar h2{font-size:22px;font-weight:800}
/* Fixed, not sticky: html/body use overflow-x:hidden, which keeps a sticky bar from staying put. */
.gc-top{background:var(--gc-header);border-bottom:3px solid var(--gc-brand);position:fixed;top:0;left:0;right:0;z-index:100;min-height:56px;padding-top:calc(12px + env(safe-area-inset-top));padding-bottom:12px;padding-left:calc(18px + env(safe-area-inset-left));padding-right:calc(68px + env(safe-area-inset-right))}
body:has(.gc-top){padding-top:calc(68px + env(safe-area-inset-top))}
#reqs,#taxcard,#onboardpkg,#mydocs,#forms,#union,#hiredcard,#profilecard,#gc-verify-slot,#pf,#delete{scroll-margin-top:calc(76px + env(safe-area-inset-top))}
.gc-top img{height:36px}
@media (min-width:900px){.gc-top img{height:44px}}

/* surfaces */
.card,.hub-card,.list-item{background:var(--gc-surface)!important;border:1px solid var(--gc-line);border-radius:var(--gc-r2);box-shadow:var(--gc-shadow);color:var(--gc-text)}
.card{padding:16px;margin-bottom:12px}
.hub-card strong,.list-item strong{color:var(--gc-text)}
.hub-card span,.list-item span{color:var(--gc-muted)}

/* controls: 48px targets, 16px text (no iOS zoom) */
.btn,body.gc-platform-page .btn{border-radius:var(--gc-r2);font-weight:700;background:var(--gc-primary);color:var(--gc-on-primary)!important;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
/* sizing at zero specificity: pages that set their own button size (quick hire .go, kiosk) keep it */
:where(.btn){min-height:48px;line-height:1.2}
.btn.secondary,body.gc-platform-page .btn.secondary{background:var(--gc-header);color:#fff!important}
.btn.ghost,body.gc-platform-page .btn.ghost,body .worker-cta a.btn.ghost{background:var(--gc-surface)!important;color:var(--gc-text)!important;border:1px solid var(--gc-line)}
.btn.gc-btn-ok{background:var(--gc-ok);color:#fff!important}
html[data-theme="dark"] .btn.gc-btn-ok{color:#0B1F14!important}
.btn.gc-btn-danger{background:var(--gc-danger);color:#fff!important}
.btn.gc-sm{min-height:40px;font-size:15px;padding:8px 14px;width:auto}
.btn.gc-storm{min-height:56px;font-size:18px}
label{font-size:13px;font-weight:600;color:var(--gc-text);margin:12px 0 6px}
input,select,textarea{min-height:48px;border:1px solid var(--gc-line);border-radius:var(--gc-r1);padding:12px;font-size:16px;background:var(--gc-surface);color:var(--gc-text)}
input[type=checkbox],input[type=radio]{min-height:0;width:22px;height:22px;accent-color:var(--gc-primary)}
input[readonly]{background:var(--gc-surface-2);color:var(--gc-muted)}
input:focus,select:focus,textarea:focus{border-color:var(--gc-focus);outline:none;box-shadow:0 0 0 3px rgba(37,99,235,.25)}
.err{color:var(--gc-danger)!important;font-size:14px}
.chip{min-height:40px;display:inline-flex;align-items:center;padding:8px 14px;font-size:14px;background:var(--gc-surface);border-color:var(--gc-line);color:var(--gc-text)}
.chip.on{background:var(--gc-ok-bg);border-color:var(--gc-ok);color:var(--gc-ok)}
.badge{font-size:12px;padding:4px 10px}
.badge.open,.badge.pass,.badge.attached{background:var(--gc-ok-bg);color:var(--gc-ok)}
.badge.fail{background:var(--gc-danger-bg);color:var(--gc-danger)}
table.gc th{color:var(--gc-muted)}
table.gc td,table.gc th{border-color:var(--gc-line)}
.banner-warn,.step-banner,.defect-confirm{background:var(--gc-pend-bg)!important;border-color:#F59E0B!important;color:var(--gc-pend)!important}
.banner-red{background:var(--gc-danger-bg)!important;border-color:var(--gc-danger)!important;color:var(--gc-danger)}
.notify-box{background:var(--gc-info-bg);border-color:#93C5FD;color:var(--gc-text)}
.proof-banner,.success-box,.mayday-sent{background:var(--gc-ok)!important;color:#fff}
.gc-footer{color:var(--gc-muted)}

/* icons (Lucide sprite /img/gc-icons.svg) */
.gc-i{width:20px;height:20px;flex:none;display:inline-block;vertical-align:-4px;stroke:currentColor}
.gc-i.sm{width:16px;height:16px;vertical-align:-3px}
.gc-i.lg{width:28px;height:28px}
.gc-ico-ok{color:var(--gc-ok)}.gc-ico-warn{color:var(--gc-pend)}.gc-ico-bad{color:var(--gc-danger)}

/* status pills */
.gc-pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 10px;font-size:13px;font-weight:700;border:1px solid transparent;line-height:1.3;white-space:nowrap}
.gc-pill.ok{background:var(--gc-ok-bg);color:var(--gc-ok)}
.gc-pill.pend{background:var(--gc-pend-bg);color:var(--gc-pend)}
.gc-pill.bad{background:var(--gc-danger-bg);color:var(--gc-danger)}
.gc-pill.muted{background:var(--gc-surface-2);color:var(--gc-muted);border-color:var(--gc-line)}
.gc-pill.info{background:var(--gc-info-bg);color:var(--gc-info)}

/* layout helpers */
.gc-eyebrow{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--gc-muted);margin:0 0 4px}
.gc-stack{display:flex;flex-direction:column;gap:10px}
.gc-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.gc-row.between{justify-content:space-between}
.gc-narrow{max-width:560px}
.gc-dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:12px 0 16px;font-size:16px}
.gc-dl dt{color:var(--gc-muted);font-weight:600}.gc-dl dd{margin:0;font-weight:700}
.gc-section{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--gc-muted);margin:20px 4px 8px}
.gc-hide{display:none!important}
.gc-skel{background:linear-gradient(90deg,var(--gc-surface-2),var(--gc-line),var(--gc-surface-2));background-size:200% 100%;animation:gcsk 1.2s infinite;border-radius:8px;min-height:18px}
@keyframes gcsk{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* quick actions grid */
.gc-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:12px}
@media (min-width:640px){.gc-actions{grid-template-columns:repeat(4,1fr)}}
.gc-action{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:88px;padding:14px;border-radius:var(--gc-r2);background:var(--gc-surface);border:1px solid var(--gc-line);box-shadow:var(--gc-shadow);color:var(--gc-text)!important;text-decoration:none;font-weight:700;font-size:15px}
.gc-action .gc-i{color:var(--gc-primary);width:24px;height:24px}
.gc-action small{font-weight:500;color:var(--gc-muted);font-size:13px}

/* verification card */
.gc-verify{border-left:4px solid var(--gc-pend)!important}
.gc-verify.ok{border-left-color:var(--gc-ok)!important}
.gc-verify.bad{border-left-color:var(--gc-danger)!important}
.gc-steps{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.gc-steps li{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--gc-line)}
.gc-steps li:first-child{border-top:0}
.gc-steps .dot{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none;background:var(--gc-surface-2);border:2px solid var(--gc-line);color:var(--gc-muted);font-weight:800;font-size:13px}
.gc-steps li.done .dot{background:var(--gc-ok);border-color:var(--gc-ok);color:#fff}
.gc-steps li.now .dot{border-color:var(--gc-primary);color:var(--gc-primary)}
.gc-steps b{display:block;font-size:15px}
.gc-steps span{font-size:13px;color:var(--gc-muted)}
.gc-lock{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px;border-radius:var(--gc-r2);background:var(--gc-surface-2);border:1px dashed var(--gc-line);color:var(--gc-muted);font-size:14px;min-width:0}
.gc-lock > span{flex:1 1 160px;min-width:0}
.gc-lock .btn{flex:0 1 auto;max-width:100%}
.gc-lock .gc-i{color:var(--gc-muted)}
.gc-choice{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid var(--gc-line);border-radius:var(--gc-r2);background:var(--gc-surface);margin-bottom:10px;cursor:pointer;width:100%;text-align:left;color:var(--gc-text);font:inherit}
.gc-choice .gc-i{color:var(--gc-primary);margin-top:2px}
.gc-choice b{display:block;font-size:16px}.gc-choice span{color:var(--gc-muted);font-size:14px}
.gc-choice.rec{border-color:var(--gc-primary);box-shadow:0 0 0 1px var(--gc-primary)}
.gc-shot{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--gc-r1);background:var(--gc-surface-2);margin-top:8px}

/* feed */
.gc-post .who{display:flex;gap:10px;align-items:center;margin-bottom:8px}
.gc-post .who b{font-size:15px}.gc-post .who small{display:block;color:var(--gc-muted);font-size:13px}
.gc-post .body{white-space:pre-wrap;word-break:break-word;font-size:16px}
.gc-rx{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.gc-rx button{min-height:40px;min-width:48px;border-radius:999px;border:1px solid var(--gc-line);background:var(--gc-surface);color:var(--gc-text);font-size:15px;padding:4px 10px;cursor:pointer}
.gc-rx button.on{background:var(--gc-info-bg);border-color:var(--gc-info);color:var(--gc-info);font-weight:700}
.gc-ava{width:40px;height:40px;border-radius:50%;background:var(--gc-header);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;flex:none}

/* top-right avatar + switcher sheet */
.gc-me{position:absolute;top:50%;right:calc(12px + env(safe-area-inset-right));transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:2px solid rgba(255,255,255,.85);background:#3A3940;color:#fff;font-weight:800;font-size:16px;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:6;padding:0}
.appbar .gc-me{top:calc(10px + env(safe-area-inset-top));transform:none}

.gc-sheet-bg{position:fixed;inset:0;z-index:2147482100;background:rgba(10,10,14,.55);display:flex;align-items:flex-end;justify-content:center}
.gc-sheet{width:100%;max-width:520px;background:var(--gc-surface);color:var(--gc-text);border-radius:16px 16px 0 0;padding:8px 16px calc(16px + env(safe-area-inset-bottom));max-height:85vh;overflow:auto;box-shadow:0 -8px 30px rgba(0,0,0,.25)}
@media (min-width:600px){.gc-sheet-bg{align-items:center}.gc-sheet{border-radius:16px}}
.gc-sheet .grab{width:40px;height:4px;border-radius:2px;background:var(--gc-line);margin:4px auto 12px}
.gc-sheet h2{font-size:20px;margin:4px 0 12px}
.gc-sheet .opt{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 4px;border:0;border-top:1px solid var(--gc-line);background:none;color:var(--gc-text);font:inherit;font-size:16px;text-align:left;cursor:pointer;text-decoration:none}
.gc-sheet .opt small{display:block;color:var(--gc-muted);font-size:13px}
.gc-sheet .opt .gc-i{color:var(--gc-muted)}
.gc-sheet .opt.cur{font-weight:700}
.gc-theme{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:8px 0 12px}
.gc-theme button{min-height:44px;border-radius:var(--gc-r1);border:1px solid var(--gc-line);background:var(--gc-surface);color:var(--gc-text);font:inherit;font-size:14px;cursor:pointer}
.gc-theme button.on{border:2px solid var(--gc-primary);font-weight:700}

/* bottom tab bar (worker / company), and the truck crew menu (.gc-nav) re-styled as bottom tabs */
.gc-tabbar,.gc-nav{position:fixed!important;left:0;right:0;bottom:0;top:auto!important;z-index:80;display:grid;grid-template-columns:repeat(5,1fr);background:var(--gc-surface)!important;border-top:1px solid var(--gc-line);border-bottom:0!important;box-shadow:0 -2px 10px rgba(0,0,0,.06);padding-bottom:env(safe-area-inset-bottom)}
.gc-tabbar a,.gc-nav a{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:var(--gc-tab-h);color:var(--gc-muted)!important;background:none!important;text-decoration:none;font-size:12px!important;font-weight:600;border:0!important;position:relative}
.gc-tabbar a .gc-i,.gc-nav a .gc-i{width:24px;height:24px}
.gc-tabbar a.on,.gc-nav a.on{color:var(--gc-primary)!important;font-weight:800}
.gc-tabbar a.on::before,.gc-nav a.on::before{content:"";position:absolute;top:0;left:22%;right:22%;height:3px;border-radius:0 0 3px 3px;background:var(--gc-primary)}
.gc-nav a.gc-nav-mayday{color:var(--gc-danger)!important}
.gc-nav a.gc-nav-mayday .gc-i{color:#fff;background:#C40000;border-radius:50%;padding:4px;width:30px;height:30px}
body.gc-has-tabs{padding-bottom:calc(var(--gc-tab-h) + env(safe-area-inset-bottom))}
body.gc-has-tabs input,body.gc-has-tabs select,body.gc-has-tabs textarea,body.gc-has-tabs button,body.gc-has-tabs label.check,body.gc-has-tabs .btn{scroll-margin-bottom:calc(var(--gc-tab-h) + 16px + env(safe-area-inset-bottom));scroll-margin-top:calc(80px + env(safe-area-inset-top))}
body:has(.gc-top) .card,body:has(.gc-top) .row2,body:has(.gc-top) h1,body:has(.gc-top) h3,body:has(.gc-top) h4{scroll-margin-top:calc(80px + env(safe-area-inset-top))}
/* r61: keep focused / scrolled-to fields above the fixed tab bar (taps never land on a tab by accident) */
html:has(body.gc-has-tabs){scroll-padding-bottom:calc(var(--gc-tab-h) + 24px + env(safe-area-inset-bottom))}
@media (min-width:900px){html:has(body.gc-has-tabs){scroll-padding-bottom:24px}}
body.gc-has-tabs .bottom{bottom:calc(var(--gc-tab-h) + env(safe-area-inset-bottom))}
body.gc-has-tabs .gc-footer{padding-bottom:calc(var(--gc-tab-h) + 24px + env(safe-area-inset-bottom))}
@media (min-width:1000px){
  .gc-tabbar{top:0!important;bottom:0;right:auto;width:96px;grid-template-columns:1fr;grid-auto-rows:min-content;padding-top:96px;border-top:0;border-right:1px solid var(--gc-line)}
  body.gc-has-tabbar{padding-left:96px;padding-bottom:0}
  body.gc-has-tabbar .gc-footer{padding-bottom:24px}
}
.gc-forget{padding:8px 16px 0;font-size:13px}
.gc-forget a{color:var(--gc-muted)}

/* hall / contractor public pages */
body.gc-public .content{padding-top:24px}
body.gc-public .card h1{font-size:24px}
[hidden]{display:none!important}
.appbar.tenant .gc-me{position:absolute;top:auto;bottom:12px;right:calc(12px + env(safe-area-inset-right));margin:0}

/* r61: toast + offline banner */
.gc-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--gc-tab-h,0px) + 16px + env(safe-area-inset-bottom));z-index:120;background:var(--gc-ink,#1B1B1F);color:#fff;padding:12px 18px;border-radius:12px;font-size:15px;font-weight:600;box-shadow:0 6px 20px rgba(0,0,0,.25);max-width:calc(100% - 32px);transition:opacity .3s}
.gc-toast.out{opacity:0}
html[data-theme="dark"] .gc-toast{background:#F2F2F4;color:#121214}
html[data-theme="sun"] .gc-toast{background:#000;color:#fff;border:2px solid #fff}
.gc-offline{position:sticky;top:0;z-index:110;display:flex;gap:10px;align-items:flex-start;background:#FEF3C7;color:#92400E;border-bottom:1px solid #F59E0B;padding:10px 16px;font-size:15px}
html[data-theme="sun"] .gc-offline{background:#fff;color:#000;border-bottom:2px solid #000}
