#crewManagementPanel{display:grid;gap:14px}
.crewPanelHead,.crewBoardHead,.crewCardTop,.crewBoardCardHead,.crewJobHead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.crewPanelHead h3,.crewBoardHead h2,.crewJobHead h3{margin:0}
.crewPanelHead .hint,.crewBoardHead .hint{margin:4px 0 0}
.crewSummary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.crewSummary article{padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:#f4f7fc}
.crewSummary strong,.crewSummary span{display:block}
.crewSummary strong{font-size:19px;color:var(--navy)}
.crewSummary span{margin-top:2px;color:var(--muted);font-size:10px;font-weight:800}
.crewListTools{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:10px}
.crewSearchField,.crewFilterField{margin:0!important}
.crewSearchField span,.crewFilterField span{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.crewList{display:grid;gap:10px}
.crewCard{padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff}
.crewCard.archived{background:#f5f6f5;opacity:.82}
.crewCardTop{align-items:center}
.crewTone--1{--crew-tone:#2f7664}
.crewTone--2{--crew-tone:#3b6ea8}
.crewTone--3{--crew-tone:#7a5aa6}
.crewTone--4{--crew-tone:#b66a2b}
.crewTone--5{--crew-tone:#b24c63}
.crewTone--6{--crew-tone:#52616f}
.crewColor{width:13px;height:13px;display:inline-block;flex:0 0 13px;border-radius:50%;background:var(--crew-tone,#2f7664);box-shadow:0 0 0 3px color-mix(in srgb,var(--crew-tone,#2f7664) 18%,transparent)}
.crewCardTitle{min-width:0;flex:1}
.crewCardTitle>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.crewCardTitle strong{font-size:14px;color:var(--navy)}
.crewCardTitle p{margin:3px 0 0;color:var(--muted);font-size:10px;line-height:1.4}
.crewState{padding:3px 6px;border-radius:999px;background:#eaf3ed;color:#2f6f54;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.archived .crewState{background:#e5e7e6;color:#68716d}
.crewUpcomingCount{white-space:nowrap;color:var(--muted);font-size:9px;font-weight:900}
.crewRoster{display:flex;gap:6px;flex-wrap:wrap;margin-top:11px}
.crewRoster>span{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:#f0f4f2;color:var(--navy);font-size:9px;font-weight:850}
.crewRoster i{width:19px;height:19px;display:grid;place-items:center;border-radius:50%;background:#dfe9e3;color:#254f40;font-style:normal;font-size:7px}
.crewRoster .crewRosterEmpty,.crewRoster .crewRosterMore{color:var(--muted)}
.crewCardMeta{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px;color:var(--muted);font-size:9px}
.crewCardMeta b{color:var(--navy)}
.crewCardActions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;padding-top:11px;border-top:1px solid var(--line)}
.crewCardActions button{min-height:38px;padding:8px 10px;font-size:9px}
.crewEmpty,.crewBoardEmpty{display:grid;gap:5px;padding:18px;border:1px dashed var(--line);border-radius:14px;text-align:center;color:var(--muted);font-size:11px}
.crewEmpty strong,.crewBoardEmpty strong{color:var(--navy);font-size:13px}
.crewBoardEmpty button{justify-self:center;margin-top:6px}
.crewColorPicker{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:0;padding:0;border:0}
.crewColorPicker legend{margin-bottom:7px;color:var(--navy);font-size:11px;font-weight:850}
.crewColorPicker label{position:relative;display:grid!important;place-items:center;margin:0!important;padding:8px!important;border:1px solid var(--line);border-radius:11px;background:#fff;cursor:pointer}
.crewColorPicker input{position:absolute;opacity:0;pointer-events:none}
.crewColorPicker .crewColorSwatch{width:24px;height:24px;border-radius:50%;background-color:var(--crew-tone,#2f7664);box-shadow:0 0 0 3px transparent}
.crewColorPicker b{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.crewColorPicker input:checked+.crewColorSwatch{box-shadow:0 0 0 3px #fff,0 0 0 5px var(--navy)}
.crewColorPicker label:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.crewRosterEditor,.crewDeployRoster{display:grid;gap:8px}
.crewRosterEditor>div:first-child,.crewDeployRoster>div:first-child{display:grid;gap:2px}
.crewMemberChoices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:300px;overflow:auto;padding:2px}
.crewMemberChoice{display:flex!important;align-items:flex-start;gap:9px;margin:0!important;padding:10px!important;border:1px solid var(--line);border-radius:12px;background:#f8faf9;color:var(--navy)!important;cursor:pointer}
.crewMemberChoice:has(input:checked){border-color:#78a48e;background:#edf5f0}
.crewMemberChoice input{width:auto!important;margin:2px 0 0!important;flex:0 0 auto}
.crewMemberChoice span,.crewMemberChoice b,.crewMemberChoice small{display:block;min-width:0}
.crewMemberChoice b{font-size:10px}
.crewMemberChoice small{margin-top:2px;color:var(--muted);font-size:8px;line-height:1.35}
.crewDeploymentBoard{display:grid;gap:13px;margin-top:12px}
.crewBoardEyebrow{display:block;margin-bottom:3px;color:#557366;font-size:8px;font-weight:950;letter-spacing:.12em}
.crewBoardHead{align-items:center}
.crewBoardSummary{display:flex;gap:7px;flex-wrap:wrap}
.crewBoardSummary span{padding:6px 9px;border-radius:999px;background:#eef5ff;color:#446356;font-size:9px;font-weight:850}
.crewBoardSummary span.needsAttention{background:#fff1da;color:#8a5b08}
.crewBoardSummary strong{font-size:11px}
.crewBoardGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.crewBoardCard{padding:12px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:inset 3px 0 0 var(--crew-tone,#d9dfdc)}
.crewBoardCardHead{align-items:center}
.crewBoardCardHead>div{display:flex;align-items:center;gap:9px;min-width:0}
.crewBoardCardHead strong,.crewBoardCardHead small{display:block}
.crewBoardCardHead strong{color:var(--navy);font-size:12px}
.crewBoardCardHead small{margin-top:2px;color:var(--muted);font-size:8px;line-height:1.35}
.crewBoardCardHead button{min-height:36px;padding:7px 9px;font-size:9px}
.crewBoardJobs{display:grid;gap:7px;margin-top:10px}
.crewBoardJob{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;padding:8px;border-radius:11px;background:#f5f8f6}
.crewBoardJobOpen{display:flex!important;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:0!important;border:0!important;background:transparent!important;color:var(--navy)!important;text-align:left}
.crewBoardJobOpen>span:first-child{min-width:0}
.crewBoardJobOpen b,.crewBoardJobOpen small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crewBoardJobOpen b{font-size:10px}
.crewBoardJobOpen small{margin-top:2px;color:var(--muted);font-size:8px}
.crewProgressButton{min-height:32px!important;padding:6px 8px!important;font-size:8px!important}
.crewStatus{display:inline-flex;align-items:center;width:max-content;padding:4px 7px;border-radius:999px;background:#e9eeec;color:#45544e;font-size:8px;font-weight:950;white-space:nowrap}
.crewStatus--dispatched{background:#e8eff8;color:#315f8e}
.crewStatus--en_route{background:#fff1d7;color:#805a12}
.crewStatus--on_site{background:#e7f5e9;color:#2d7140}
.crewStatus--completed{background:#ddf1e4;color:#236238}
.crewStatus--cancelled,.crewStatus--reassigned{background:#f0e7e7;color:#855050}
.crewAvailable{display:grid;gap:2px;padding:10px;border:1px dashed #cfd9d4;border-radius:11px;color:#537465}
.crewAvailable span{font-size:10px;font-weight:900}
.crewAvailable small{color:var(--muted);font-size:8px}
.crewBoardUnassigned{box-shadow:inset 3px 0 0 #c48a28}
.crewUnassignedMark{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#fff0d2;color:#8a5b08;font-weight:950}
.crewJobBadge{display:inline-flex;align-items:center;gap:5px;width:max-content;max-width:100%;margin-top:6px;padding:4px 7px;border-radius:999px;background:color-mix(in srgb,var(--crew-tone,#2f7664) 11%,#fff);color:var(--navy);font-size:8px}
.crewJobBadge i{width:7px;height:7px;border-radius:50%;background:var(--crew-tone,#2f7664)}
.crewJobBadge b,.crewJobBadge span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crewJobBadge span{color:var(--muted);font-weight:800}
.crewReadiness{display:grid;gap:6px;padding:11px;border:1px solid #e4d2ae;border-radius:12px;background:#fff9ed;color:#6d541f;font-size:9px;line-height:1.45}
.crewReadiness.hidden{display:none}
.crewReadiness strong,.crewReadiness span{display:block}
.crewReadiness ul{margin:0;padding-left:18px}
.crewReadiness .crewReady{color:#2e6b43}
.crewReadiness .crewConflictTitle{color:#9b4d35}
.crewJobPanel{display:grid;gap:9px;margin-top:10px;border-left:3px solid var(--crew-tone,#d9dfdc)}
.crewJobHead{align-items:center}
.crewJobHead h3{display:flex;align-items:center;gap:7px;font-size:14px}
.crewJobRoster,.crewJobNote{margin:0;color:var(--muted);font-size:10px;line-height:1.5}
.crewJobNote{padding:8px 9px;border-radius:10px;background:#f4f7fc;color:var(--navy)}
.crewJobActions{display:flex;gap:7px;flex-wrap:wrap}
.crewJobActions button{min-height:38px;padding:8px 10px;font-size:9px}
.crewHistory{display:grid;gap:0}
.crewHistory article{display:grid;grid-template-columns:90px minmax(0,1fr);gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}
.crewHistory article:last-child{border-bottom:0}
.crewHistory strong,.crewHistory p{display:block;margin:0}
.crewHistory strong{font-size:10px;color:var(--navy)}
.crewHistory p{margin-top:4px;color:var(--muted);font-size:9px;line-height:1.45}
.crewDeploymentList{display:grid;gap:9px}
.crewDeploymentList article{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:13px;background:#f8faf9}
.crewDeploymentListHead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.crewDeploymentListHead strong,.crewDeploymentListHead small{display:block}
.crewDeploymentListHead strong{color:var(--navy);font-size:11px}
.crewDeploymentListHead small{margin-top:3px;color:var(--muted);font-size:8px}
.crewDeploymentList p{margin:0;color:var(--muted);font-size:9px;line-height:1.45}
.crewDeploymentList button{justify-self:start;min-height:36px;padding:7px 10px;font-size:9px}
.manualCrewPicker{padding:12px;border:1px solid #cfe0d7;border-radius:13px;background:#f1f7f3}
.manualCrewPicker .hint{margin:5px 0 0}
body.employee-preview #createCrewButton,
body.employee-preview [data-crew-action="edit"],
body.employee-preview [data-crew-action="deploy"],
body.employee-preview [data-crew-action="toggle"],
body.employee-preview #openCrewDeploymentButton,
body.employee-preview [data-board-action="deploy"],
body.employee-preview [data-board-action="deploy-unassigned"],
body.employee-preview #jobDeployCrew,
body.employee-preview #jobClearCrew{display:none!important}
@media(max-width:680px){
  .crewBoardGrid{grid-template-columns:1fr}
}
@media(max-width:480px){
  .crewPanelHead,.crewBoardHead{align-items:stretch}
  .crewPanelHead{display:grid}
  .crewPanelHead>button,.crewBoardHead>button{width:100%;min-height:43px}
  .crewSummary{grid-template-columns:repeat(3,1fr)}
  .crewSummary article{padding:9px}
  .crewSummary strong{font-size:16px}
  .crewSummary span{font-size:8px}
  .crewListTools{grid-template-columns:1fr}
  .crewCardTop{display:grid;grid-template-columns:13px minmax(0,1fr)}
  .crewUpcomingCount{grid-column:2}
  .crewCardActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .crewCardActions button:last-child:nth-child(odd){grid-column:1/-1}
  .crewColorPicker{grid-template-columns:repeat(6,1fr);gap:5px}
  .crewColorPicker label{padding:7px 4px!important}
  .crewColorPicker .crewColorSwatch{width:21px;height:21px}
  .crewMemberChoices{grid-template-columns:1fr;max-height:340px}
  .crewBoardHead{display:grid}
  .crewBoardJob{grid-template-columns:1fr}
  .crewProgressButton{width:100%;min-height:38px!important}
  .crewJobActions{display:grid;grid-template-columns:1fr 1fr}
  .crewJobActions button:first-child{grid-column:1/-1}
  .crewHistory article{grid-template-columns:78px minmax(0,1fr)}
  .crewDeploymentListHead{display:grid}
  .crewDeploymentList button{width:100%}
}

