/* Employee sheet + confirmation overlay (UI/UX Pro Max v3) */
body.has-dialog{overflow:hidden}
.crew-dialog[hidden],.ui-dialog[hidden]{display:none!important}
.crew-dialog,.ui-dialog{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:24px;isolation:isolate}
.crew-dialog-backdrop,.ui-dialog-backdrop{position:absolute;inset:0;background:rgba(8,22,18,.58);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.crew-dialog-sheet,.ui-dialog-panel{position:relative;z-index:1;width:min(500px,100%);background:#fff;color:#20392f;border:1px solid #e1ebe5;border-radius:26px;box-shadow:0 32px 120px rgba(6,24,17,.2);padding:29px;outline:none;animation:crew-show .22s cubic-bezier(.19,.8,.31,1) both}
.crew-sheet-handle{display:none}
.crew-sheet-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.crew-sheet-label{font-size:11px;letter-spacing:1.5px;font-weight:800;color:#688678}
.crew-sheet-close{height:44px;width:44px;min-width:44px;display:grid;place-items:center;border-radius:13px;border:1px solid #e1ece4;background:#f5faf6;color:#355b49;font-size:18px}
.crew-sheet-close:hover{background:#e5f3e9}
.crew-profile{display:flex;align-items:center;gap:20px;padding:25px 0 21px}
.crew-bot-mark{display:grid;place-items:center;flex:none;height:78px;width:78px;border-radius:23px;background:linear-gradient(135deg,#e4f7ee,#bce5d0);color:#277a59;font-size:38px;box-shadow:inset 0 -3px 0 #91d0b5}
.crew-profile h2{font-size:32px;line-height:1.15;letter-spacing:-1.25px;font-weight:850;color:#1d4131;margin:0 0 7px}
.crew-profile p{margin:0;font-size:15px;color:#567366;font-weight:600}
.crew-divider{height:1px;background:#e3eee5}
.crew-section{padding:22px 0 5px}
.crew-section-label{font-size:11px;letter-spacing:1.25px;font-weight:850;color:#748f80}
.crew-work-status{display:flex;align-items:center;gap:9px;margin:11px 0 6px;color:#264a3a;font-size:17px}
.crew-status-dot{display:block;width:10px;height:10px;border-radius:50%;background:#8fa9a0;box-shadow:0 0 0 4px #edf2ef;flex:none}
.crew-status-dot.is-active{background:#1a9d6d;box-shadow:0 0 0 4px #dff8e9}
.crew-section p{font-size:14px;color:#577469;line-height:1.75;margin:7px 0 0;overflow-wrap:anywhere}
.crew-sheet-actions{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:24px}
.crew-action-primary,.crew-action-secondary{border-radius:13px;min-height:50px;border:1px solid transparent;font-weight:750;font-size:14px;padding:12px 18px}
.crew-action-primary{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#17664f;color:white}
.crew-action-primary:hover{background:#0e523e}
.crew-action-secondary{background:#f2f7f3;color:#416757;border-color:#dce9df;min-width:82px}
.crew-action-secondary:hover{background:#e7f1e9}
.crew-helper{font-size:13px;line-height:1.65;color:#708679;margin:16px 0 0;padding:13px 16px;background:#f5faf6;border-radius:11px}
.agent-avatar,.employee-row{cursor:pointer}
.agent-avatar:focus-visible,.employee-row:focus-visible{outline:3px solid #d6ffe3;outline-offset:4px}
.ui-dialog-panel{width:min(420px,100%);padding:28px}
.ui-dialog-panel h2{font-size:23px;letter-spacing:-.6px;margin:0 0 13px;color:#1c4634}
.ui-dialog-panel p{color:#5d776a;font-size:15px;line-height:1.7;margin:0 0 24px}
.ui-dialog-actions{display:flex;justify-content:flex-end;gap:10px}
.ui-dialog-actions>button{min-width:92px}
.ui-dialog-actions>button[hidden]{display:none!important}
@keyframes crew-show{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:780px){
  .crew-dialog,.ui-dialog{padding:0;place-items:end center}
  .crew-dialog-sheet{width:100%;max-width:none;max-height:min(88dvh,730px);overflow-y:auto;border-radius:26px 26px 0 0;border-bottom:0;padding:14px 23px calc(20px + env(safe-area-inset-bottom));animation:crew-up .24s ease-out both}
  .crew-sheet-handle{display:block;width:40px;height:5px;border-radius:5px;background:#d9e4dc;margin:0 auto 18px}
  .crew-profile{padding:17px 0 20px;gap:15px}
  .crew-profile h2{font-size:27px}
  .crew-bot-mark{width:64px;height:64px;border-radius:19px;font-size:32px}
  .crew-section{padding:19px 0 4px}
  .crew-sheet-actions{margin-top:20px}
  .ui-dialog{place-items:center;padding:20px}
  .ui-dialog-panel{border-radius:20px;width:100%;padding:24px}
}
@keyframes crew-up{from{opacity:.5;transform:translateY(40px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.crew-dialog-sheet,.ui-dialog-panel{animation:none!important}.crew-dialog-backdrop,.ui-dialog-backdrop{backdrop-filter:none}}
/* Portfolio preview uses the same dialog language, never a native browser alert. */
#artifact-modal{z-index:125}
#artifact-modal .modal-shade{background:rgba(8,22,18,.58);backdrop-filter:blur(5px)}
#artifact-modal .modal-inner{box-shadow:0 28px 90px rgba(5,25,17,.24);border-radius:22px}
#artifact-modal #close-modal{display:grid;place-items:center;min-width:44px;min-height:44px;border-radius:12px}
@media(max-width:780px){
 #artifact-modal{padding:0;place-items:end center}
 #artifact-modal .modal-inner{width:100%;max-width:none;max-height:88dvh;border-radius:25px 25px 0 0;padding:21px 20px calc(25px + env(safe-area-inset-bottom))}
 #artifact-modal .modal-top{position:sticky;top:0;background:#fff;z-index:1;padding:5px 0 15px}
}
