:root{--ink:#111827;--muted:#6b7280;--line:#d1d5db;--bg:#f3f4f6;--card:#fff;--brand:#0b91f1;--blue:#1f5a83;--green:#047857;--greenbg:#ecfdf5;--red:#b91c1c;--redbg:#fef2f2;--purple:#7c3aed}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif;line-height:1.4}.topbar{position:sticky;top:0;z-index:30;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 2px 8px rgba(0,0,0,.05)}.topbar-inner{max-width:1240px;margin:auto;padding:9px 14px;display:flex;gap:14px;align-items:center}.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:900;white-space:nowrap}.brand img.brand-logo-wide{width:245px;height:auto;display:block;object-fit:contain;object-position:left center}.edition-badge{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#eff6ff;border:1px solid #bfdbfe;color:#075985;font-size:.72rem;font-weight:900;letter-spacing:.02em}.main-nav{display:flex;gap:4px;margin-left:auto;align-items:center}.main-nav a{padding:8px 9px;border-radius:8px;color:var(--ink);text-decoration:none;font-weight:800;font-size:.87rem;white-space:nowrap}.main-nav a:hover{background:#f3f4f6}.profile-menu{position:relative;margin-left:2px}.profile-menu summary{list-style:none;display:flex;align-items:center;gap:8px;min-width:155px;padding:6px 8px 6px 11px;border-left:1px solid var(--line);cursor:pointer;border-radius:8px;user-select:none}.profile-menu summary::-webkit-details-marker{display:none}.profile-menu summary:hover,.profile-menu[open] summary{background:#f3f4f6}.profile-copy{display:flex;flex-direction:column;min-width:0;line-height:1.15}.profile-copy strong{font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:165px}.profile-copy small{font-size:.72rem;color:var(--muted);margin-top:3px;white-space:nowrap}.profile-chevron{font-size:.76rem;color:var(--muted);margin-left:auto;transition:transform .15s}.profile-menu[open] .profile-chevron{transform:rotate(180deg)}.profile-dropdown{position:absolute;right:0;top:calc(100% + 7px);z-index:80;width:220px;background:#fff;border:1px solid var(--line);border-radius:11px;padding:7px;box-shadow:0 12px 28px rgba(0,0,0,.16)}.profile-dropdown-heading{display:flex;flex-direction:column;padding:8px 9px 10px;border-bottom:1px solid #e5e7eb;margin-bottom:4px}.profile-dropdown-heading strong{font-size:.88rem}.profile-dropdown-heading small{font-size:.75rem;color:var(--muted);margin-top:2px}.profile-dropdown a{display:block;padding:9px 10px;border-radius:7px;color:var(--ink);text-decoration:none;font-weight:800;font-size:.84rem}.profile-dropdown a:hover{background:#f3f4f6}.profile-dropdown .logout-link{color:var(--red)}.page{max-width:1240px;margin:18px auto 60px;padding:0 14px}footer{text-align:center;color:var(--muted);font-size:.82rem;padding:20px}.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;margin:14px 0;box-shadow:0 1px 6px rgba(0,0,0,.04)}h1,h2{margin-top:0}.hero{display:flex;gap:15px;justify-content:space-between;align-items:center;margin:10px 0 16px}.hero h1{margin-bottom:2px}.hero-actions{display:flex;gap:8px;flex-wrap:wrap}.muted{color:var(--muted)}.small,.block{font-size:.82rem}.block{display:block;margin-top:3px}.btn,button{border:0;border-radius:9px;padding:10px 13px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-block;font-size:.9rem}.primary{background:var(--ink);color:#fff}.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}.ghost{background:#f3f4f6;color:var(--ink)}.danger{background:#fff;color:var(--red);border:1px solid #fecaca}.smallbtn{padding:7px 9px;font-size:.78rem}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat{background:#fff;border:1px solid var(--line);border-radius:13px;padding:15px}.stat strong{display:block;font-size:1.7rem}.stat span{color:var(--muted);font-size:.85rem;font-weight:700}.filters{display:grid;grid-template-columns:minmax(240px,1fr) minmax(180px,300px) auto auto;gap:10px;align-items:end}label{display:block;font-size:.82rem;font-weight:800;color:#374151}input,select{width:100%;margin-top:5px;border:1px solid #9ca3af;border-radius:9px;padding:10px;font:inherit;background:#fff;color:var(--ink)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.section-head h2{margin:0}.pill{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px;padding:5px 9px;font-size:.78rem;font-weight:800;color:#4b5563}.table-wrap{overflow-x:auto;margin-top:10px}table{border-collapse:collapse;width:100%;font-size:.89rem}th,td{padding:9px 8px;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top}th{font-size:.78rem;color:#4b5563;background:#f9fafb}.status{display:inline-block;border-radius:999px;padding:4px 8px;font-size:.76rem;font-weight:900;text-transform:capitalize}.status.under_construction,.status.active,.status.complete{background:var(--greenbg);color:var(--green)}.status.complete{background:var(--greenbg)}.status.na,.status.pending,.status.not\ created{background:#f5f3ff;color:var(--purple)}.status.complete,.status.disabled,.status.archived{background:#f3f4f6;color:#4b5563}.records{display:grid;gap:8px;margin-top:10px}.record{display:flex;justify-content:space-between;gap:14px;padding:12px;border:1px solid #e5e7eb;border-radius:10px;color:var(--ink);text-decoration:none}.record:hover{border-color:var(--brand);background:#fffbeb}.record div{display:flex;flex-direction:column}.record span{font-size:.82rem;color:var(--muted)}.record-right{text-align:right}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.summary-grid>div{border:1px solid #e5e7eb;border-radius:10px;padding:12px;display:flex;flex-direction:column}.summary-grid span{font-size:.75rem;color:var(--muted);font-weight:800;text-transform:uppercase}.summary-grid small{color:var(--muted);margin-top:4px}.msg{padding:11px 13px;border-radius:10px;margin:10px 0}.msg.ok{background:#ecfdf5;border-left:5px solid var(--green)}.msg.err{background:#fef2f2;border-left:5px solid var(--red)}.login-wrap{min-height:70vh;display:grid;place-items:center}.login-card{width:min(460px,100%)}.login-card form{display:grid;gap:12px}.account-form{display:grid;gap:7px;min-width:230px;margin-top:8px}details summary{cursor:pointer;font-weight:800;color:var(--blue)}@media(max-width:900px){.topbar-inner{flex-wrap:wrap}.main-nav{order:3;width:100%;margin-left:0;border-top:1px solid #e5e7eb;padding-top:6px;overflow-x:auto}.profile-menu{margin-left:auto}.stats,.summary-grid{grid-template-columns:1fr 1fr}.filters{grid-template-columns:1fr 1fr}.record{flex-direction:column}.record-right{text-align:left}}@media(max-width:560px){.page{padding:0 9px}.brand span{font-size:.86rem}.brand img{width:36px}.topbar-inner{gap:8px;padding:7px 9px}.main-nav{gap:2px}.main-nav a{font-size:.78rem;padding:7px 8px}.profile-menu summary{min-width:0;border-left:0;padding:6px}.profile-copy small{display:none}.profile-copy strong{max-width:105px;font-size:.8rem}.profile-dropdown{width:210px}.stats,.summary-grid,.filters{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}.card{padding:12px}th,td{padding:8px 6px;font-size:.82rem}}
.login-branding{text-align:center;margin:-3px 0 12px}
.login-branding img{width:104px;height:104px;object-fit:contain;border-radius:22px}
.login-branding .edition{margin-top:5px;font-size:.8rem;font-weight:900;color:#075985;text-transform:uppercase;letter-spacing:.05em}

.company-picker{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
.company-picker label{min-width:260px;flex:1}
.crew-company-card{border-left:5px solid var(--brand)}
.crew-member-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr) auto;gap:8px;align-items:end}
.inline-actions{display:flex;gap:6px;flex-wrap:wrap}
.leader-badge{display:inline-block;background:#eff6ff;color:#075985;border:1px solid #bfdbfe;padding:3px 7px;border-radius:999px;font-size:.72rem;font-weight:900}
.hazard-phase{font-weight:800;color:#075985}
@media(max-width:760px){.crew-member-form{grid-template-columns:1fr}.crew-member-form .btn{width:100%}}


/* Crowapp dashboard visual refresh */
.hero-actions .primary{
  background:#fff;
  color:#075985;
  border:1.5px solid #38bdf8;
  box-shadow:0 1px 3px rgba(2,132,199,.08);
}
.hero-actions .primary:hover{
  background:#f0f9ff;
  border-color:#0ea5e9;
}

/* Give the main dashboard boxes a cleaner Crowapp-blue edge. */
.card{
  border-color:#bfdbfe;
  box-shadow:0 2px 10px rgba(2,132,199,.06);
}
.stat{
  border:1.5px solid #bfdbfe;
  box-shadow:0 2px 8px rgba(2,132,199,.06);
  position:relative;
  overflow:hidden;
}
.stat::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#38bdf8;
}
.stat strong{
  color:#0f172a;
}
.record{
  border-color:#dbeafe;
}
.record:hover{
  border-color:#38bdf8;
  background:#f0f9ff;
  box-shadow:0 2px 8px rgba(2,132,199,.07);
}

/* Slight Crowapp treatment on section headings without making the UI busy. */
.section-head h2{
  color:#0f2942;
}

/* Crowapp dashboard visual refresh v3
   Keep the v1 header/nav exactly as-is; only make the other hero buttons
   match the Hazard Assessment blue-outline treatment. */
.hero-actions .secondary{
  background:#fff;
  color:#075985;
  border:1.5px solid #38bdf8;
  box-shadow:0 1px 3px rgba(2,132,199,.08);
}
.hero-actions .secondary:hover{
  background:#f0f9ff;
  border-color:#0ea5e9;
}


/* Crowapp history grouping — supervisor > collapsible job-address folder */
.history-supervisor{border-left:5px solid #38bdf8}
.history-job-folder{margin-top:10px;border:1.5px solid #dbeafe;border-radius:11px;background:#fff;overflow:hidden}
.history-job-folder[open]{border-color:#60a5fa;box-shadow:0 2px 8px rgba(2,132,199,.07)}
.history-job-summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;cursor:pointer;background:#fff;user-select:none}
.history-job-summary::-webkit-details-marker{display:none}
.history-job-summary:hover{background:#f0f9ff}
.history-job-folder[open]>.history-job-summary{background:#eff6ff;border-bottom:1px solid #dbeafe}
.history-job-title{font-weight:900;color:#1f5a83;font-size:1rem;min-width:0;overflow-wrap:anywhere}
.history-job-summary-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.history-job-chevron{font-size:1rem;color:#1f5a83;transition:transform .15s ease}
.history-job-folder[open] .history-job-chevron{transform:rotate(180deg)}
.history-job-body{padding:2px 10px 10px;background:#fff}
.history-job-body .records{margin-top:8px}
.history-supervisor .record{background:#fff}
@media(max-width:560px){
  .history-job-summary{align-items:flex-start;padding:11px}
  .history-job-title{font-size:.95rem}
  .history-job-summary-right{gap:6px}
}


/* FieldSimple compact mobile brand header v5 */
@media(max-width:560px){
  .topbar-inner{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px 8px;
    padding:7px 9px;
  }
  .brand{
    width:auto;
    flex:1 1 auto;
    min-width:0;
    display:flex;
    align-items:center;
  }
  .brand>a{
    display:block!important;
    width:min(225px,66vw);
    max-width:100%;
    text-decoration:none;
  }
  .brand img.brand-logo-wide{
    display:block;
    width:100%;
    height:auto;
    max-height:88px;
    object-fit:contain;
    object-position:left center;
  }
  .edition-badge{display:none}
  .profile-menu{order:2;margin-left:auto}
  .main-nav{
    order:3;
    width:100%;
    margin-left:0;
    border-top:1px solid #e5e7eb;
    padding-top:6px;
    overflow-x:auto;
  }
  .topbar-inner>.brand:only-child{
    flex:0 1 auto;
    margin:0 auto;
  }
}

/* FieldSimple global Home button — simple escape route from every signed-in page */
.fieldsimple-page-home{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin:0 0 8px;
}
.fieldsimple-page-home-button{
  background:#fff!important;
  color:#075985!important;
  border:1.5px solid #38bdf8!important;
  box-shadow:0 1px 3px rgba(2,132,199,.08);
  padding:7px 10px;
  font-size:.8rem;
}
.fieldsimple-page-home-button:hover{
  background:#f0f9ff!important;
  border-color:#0ea5e9!important;
  text-decoration:none;
}
@media(max-width:560px){
  .fieldsimple-page-home{
    margin-bottom:7px;
  }
  .fieldsimple-page-home-button{
    min-height:38px;
    display:inline-flex;
    align-items:center;
  }
}

