/* Crew (js/crew.js): the job's Crew tab, the planner, People / Roles, My work. White and neutral, HV teal as the only accent;
   status colours only for status (confirmed green, moved amber, open grey). */
.crpg .crhead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; margin-bottom: 14px; }
.crpg .crhead .title { flex: 1; min-width: 0; }
.crpg .crhead h1 { margin: 0; font-size: 19px; font-weight: 600; display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.crpg .crhead h1 .no { font: 600 15px var(--mono); color: var(--accent); text-decoration: none; }
.crpg .crhead h1 .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crpg .crhead .sub { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-2); font-size: 13px; margin-top: 4px; } .crpg .crhead .sub b { color: var(--text); font-weight: 600; }
.crpg .kpi b .muted { font-size: 14px; }
.crbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; } .crbar:empty { display: none; }
.crline { margin-bottom: 14px; }
.crlh { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.crlh h2 { margin: 0; font-size: 15px; font-weight: 600; } .crlh h2 .muted { font-weight: 400; } .crlh .grow { flex: 1; }
.crgrid th, .crgrid td { white-space: nowrap; }
.crgrid td.crc { min-width: 128px; vertical-align: top; border-left: 1px solid var(--line); }
.crgrid td.crc > * { display: block; } .crgrid td.crc b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.crgrid td.crc.confirmed { background: color-mix(in srgb, var(--green-bg) 55%, transparent); }
.crgrid td.crc.reconfirm { background: color-mix(in srgb, var(--amber-bg) 60%, transparent); }
.crgrid td.crc .pill { display: inline-flex; margin: 2px 0; }
.crh { display: inline-flex !important; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.crh.ok { color: var(--green); } .crh.hod { color: var(--amber); }
.crreqs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 12.5px; }
.crreqs .lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.crreq { display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--hover); color: var(--text-2); }
.crreq.yes, .crreq.part { background: var(--green-bg); color: var(--green); } .crreq.no { text-decoration: line-through; opacity: .7; }
.crreq .btn { min-height: 0; padding: 1px 8px; }
.crhours { margin-top: 12px; } .crhours summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); padding: 4px 0; }
.crhours table { margin-top: 6px; }
.crexadd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.crwarn { display: inline-flex; gap: 4px; align-items: center; color: var(--amber); font-size: 12px; font-weight: 600; }
.lnk { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }

/* dialogs */
.dialog.crdlg { max-width: 640px; } .dialog.crdlg.wide { max-width: 760px; }
.dialog.crdlg h2 { margin: 0 0 6px; font-size: 16px; }
.crlist { display: grid; gap: 6px; max-height: 46vh; overflow: auto; margin: 10px 0; }
.crsl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.crsl:hover { background: var(--hover); } .crsl.busy { opacity: .75; }
.crsl input { margin-top: 3px; } .crsl .nm { flex: 1; display: grid; gap: 2px; min-width: 0; } .crsl .btn { flex: none; }
.crask { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: center; } .crask .w { grid-column: 1 / -1; }
.crroles { display: flex; flex-wrap: wrap; gap: 6px 14px; } .crroles .chk { display: inline-flex; gap: 6px; align-items: center; }
.crroles .input { width: 110px; padding: 3px 6px; font-size: 12px; }
.crrcs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .crrc h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0; }
.crrc .field { margin-bottom: 6px; } .crot { display: grid; grid-template-columns: 70px 1fr; gap: 6px; margin-bottom: 4px; }
@media (max-width: 640px) { .crrcs, .crask { grid-template-columns: 1fr; } }

/* planner */
.crplan { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.cropen { position: sticky; top: 8px; max-height: calc(100vh - 140px); overflow: auto; }
.cropen h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.cro { display: grid; gap: 2px; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 6px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface); cursor: grab; font: inherit; color: var(--text); }
.cro:hover { border-color: var(--accent); } .cro .mono { color: var(--accent); font: 600 12px var(--mono); } .cro .ok { color: var(--green); }
.crboard { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.crtab { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.crtab th, .crtab td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px 5px; min-width: 64px; vertical-align: top; }
.crtab th { position: sticky; top: 0; background: var(--surface); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.crtab th.we, .crtab td.we { background: var(--bg); } .crtab .today { box-shadow: inset 0 2px 0 var(--accent); }
.crtab .who { position: sticky; left: 0; background: var(--surface); min-width: 170px; border-left: 0; z-index: 1; } .crtab .who b { display: block; font-weight: 600; } .crtab .who .muted { display: block; }
.crtab tr.tier td { background: var(--bg); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.crtab tr.drop td { background: var(--accent-bg); }
.crtab td.leave { background: repeating-linear-gradient(135deg, var(--hover) 0 5px, transparent 5px 10px); }
.crtab td.unav { background: var(--hover); }
.crbarj { display: block; margin: 1px 0; padding: 2px 5px; border-radius: 4px; font: 600 11px var(--mono); text-decoration: none; background: var(--accent-bg); color: var(--accent); white-space: nowrap; }
.crbarj.reconfirm { background: var(--amber-bg); color: var(--amber); } .crbarj.crelse { background: var(--hover); color: var(--text-2); }   /* booked on another warehouse's job (planner switch) */ .crbarj.st-quote, .crbarj.st-enquiry { opacity: .7; border: 1px dashed currentColor; }
@media (max-width: 900px) { .crplan { grid-template-columns: 1fr; } .cropen { position: static; max-height: none; } }

/* money */
.crbars { display: flex; gap: 8px; align-items: flex-end; height: 160px; padding: 8px 0; }
.crbm { flex: 1; display: grid; justify-items: center; gap: 4px; height: 100%; grid-template-rows: 1fr auto; }
.crbm .bs { display: flex; gap: 2px; align-items: flex-end; height: 100%; } .crbm .bs i { width: 12px; border-radius: 3px 3px 0 0; display: block; }
.crbm .bs i.p, .crkey.p { background: var(--c1, #8fd3cd); } .crbm .bs i.c, .crkey.c { background: var(--c3, #f3c6a5); } .crbm small { color: var(--muted); font-size: 11px; }
.crkey { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin: 0 4px 0 8px; }

/* My work: a phone first */
.crwork { max-width: 720px; }
.crh2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; font-weight: 600; }
.crreqc, .crhrs, .crjob { margin-bottom: 10px; display: grid; gap: 6px; }
.crreqc { border-color: var(--accent); } .crreqc.warn { border-color: var(--amber); background: var(--amber-bg); }
.crrt { font-size: 15px; } .crrt b { font-weight: 600; } .crrt .mono { font: 600 13px var(--mono); color: var(--accent); }
.crrd { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--text-2); font-size: 13.5px; } .crrd svg { vertical-align: -2px; }
.crpay { font: 600 20px var(--mono); } .crpay .muted { font: 400 13px var(--font); }
.crans { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; } .crans .btn { min-height: 44px; min-width: 110px; justify-content: center; }
.crsome { font-size: 13px; } .crsome summary { cursor: pointer; color: var(--accent); } .crsome .chk { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.crdays { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; } .crdays li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.crdays a { color: var(--accent); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.crun { display: flex; flex-wrap: wrap; gap: 6px; } .crunp { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--hover); font-size: 13px; }
.crunadd { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .crunadd .input { min-height: 40px; }
@media (max-width: 560px) { .crans .btn { flex: 1; } .crwork .tbl td { padding: 8px 6px; } }
.crdone { list-style: none; margin: 0; padding: 4px 14px; display: grid; }
.crdone li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.crdone li:last-child { border-bottom: 0; } .crdone .grow { flex: 1; } .crdone .mono { font: 600 12px var(--mono); color: var(--accent); } .crdone .num { font-family: var(--mono); }
.crbill { display: grid; gap: 8px; } .crbill .crdays li { padding: 4px 0; border-bottom: 1px solid var(--line); } .crbill .crdays li:last-child { border-bottom: 0; }
.crbill .crdays li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; }
.crbill .crdays .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .crbill .crdays .t .mono { margin-right: 4px; } .crbill .crans { justify-content: flex-start; }
/* Crew pay on the job: one row per person on wide screens, stacked on phones */
.crpays { list-style: none; margin: 0; padding: 0; display: grid; }
.crpays li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.crpays li:last-child { border-bottom: 0; } .crpays .a { font-family: var(--mono); text-align: right; white-space: nowrap; }
.crpays .x { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; } .crpays .x .input { width: 150px; }
@media (max-width: 760px) {
  .crpays li { grid-template-columns: minmax(0, 1fr) auto; }
  .crpays .s { grid-column: 1; grid-row: 2; } .crpays .a { grid-row: 1; grid-column: 2; }
  .crpays .x { grid-column: 1 / -1; justify-content: flex-start; } .crpays .x .input { flex: 1 1 140px; min-height: 40px; } .crpays .x .btn { min-height: 40px; }
}
/* a request to work (My work and My bookings): a pastel teal label, the deadline in amber, Yes / No large enough for a thumb */
.crreqc .crrk { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.crreqc .crdl { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); letter-spacing: 0; text-transform: none; font-size: 12px; }
.crreqc .crfy { margin: 0; font-size: 12.5px; color: var(--amber); font-weight: 500; }
.crreqc .crans .btn svg { width: 16px; height: 16px; }
.mypg .myask { margin-bottom: 18px; } .mypg .myask .crh2 { margin-top: 0; }
.crsl .nm > .pill { justify-self: start; width: fit-content; }   /* a tag, not a full-width bar */
.crsl.asked { cursor: default; opacity: .75; }
