/* Delivery workspace */
body[data-role=agent]{--ag-ink:#352535;--ag-muted:#6e616b;--ag-rule:#e7dfe4;--ag-plum:#543047;--ag-wash:#faf8f9;background:var(--ag-wash);color:var(--ag-ink)}
body[data-role=agent] #site-header{position:sticky;inset:0 0 auto;z-index:60;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:nowrap;min-height:62px;height:auto;margin:0;padding:8px clamp(16px,3.8vw,60px);border:0;border-bottom:1px solid var(--ag-rule);background:white;box-shadow:none}
.ag-brand{display:inline-flex;align-items:center;gap:7px;color:#341d31;font-size:21px;letter-spacing:-.05em;text-decoration:none}
.ag-brand img{display:block}.ag-brand b{font-weight:750}
body[data-role=agent] #site-header .ag-nav{display:flex;position:static;justify-content:center;align-items:center;flex-flow:row nowrap;gap:4px;margin:0;padding:4px;border:1px solid #ece6ea;border-radius:13px;background:#f8f5f7}
#site-header .ag-nav a{display:inline-flex;align-items:center;gap:7px;min-height:35px;padding:7px 12px;border-radius:9px;color:#665662;font:600 13px var(--brand-sans);text-decoration:none}
#site-header .ag-nav a:hover{background:#f0e7ed}#site-header .ag-nav a[aria-current=page]{background:#fff;color:#522440;box-shadow:0 1px 4px #3c1a352a}
.ag-nav .ui-icon{width:17px;height:17px;--glyph-ink:#69485e;--glyph-accent:#c68896}.ag-short{display:none}
.ag-account{position:relative;flex:0 0 auto}.ag-account summary{display:grid;place-items:center;list-style:none;width:38px;height:38px;cursor:pointer;background:#f6dccf;color:#4d283f;border-radius:50%;font-weight:700}.ag-account summary::marker{content:""}
.ag-account .rt-account-panel{width:min(260px,85vw);background:white}.ag-account .rt-account-id{overflow-wrap:anywhere}.ag-account .auth-session-actions{margin:0;padding:4px}
body[data-role=agent] .portal-layout{display:block;max-width:none;min-height:calc(100dvh - 62px);padding:0;margin:0;background:var(--ag-wash)}
body[data-role=agent] .portal-main{width:min(100%,1200px);max-width:1200px;min-width:0;margin:0 auto;padding:clamp(20px,3vw,38px) clamp(16px,3vw,40px) 44px;box-sizing:border-box;color:var(--ag-ink)}
body[data-role=agent] .portal-main>.mobile-nav-button,body[data-role=agent] .workspace-tools .mobile-nav-button{display:none}
body[data-role=agent] .workspace-tools:has(.workspace-identity:empty),body[data-role=agent] .workspace-tools:has(+.ag-heading){display:none}
.ag-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px}
body[data-role=agent] .ag-heading h1,body[data-role=agent] .portal-main h1{display:block;margin:0;color:var(--ag-ink);font:680 clamp(26px,3vw,39px)/1.15 var(--brand-sans);letter-spacing:-.048em}
.ag-heading .heading-art{display:none}.ag-heading p{color:var(--ag-muted);font-size:14px;line-height:1.45;margin:5px 0 0}
.ag-update{display:flex;align-items:center;gap:9px;flex-shrink:0}.ag-update small{font-size:12px;color:var(--ag-muted)}.ag-update small:empty{display:none}
body[data-role=agent] :is(.portal-main,#client-dialog) .btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 14px;font:650 14px var(--brand-sans);color:white;background:var(--ag-plum);border:1px solid transparent;border-radius:9px}
body[data-role=agent] :is(.portal-main,#client-dialog) .btn.outline{color:#572f4a;background:white;border-color:#d9cdd5}
body[data-role=agent] :is(.portal-main,#client-dialog) .btn:disabled{opacity:.65}
.ag-refresh:before{content:'↻';font:500 19px/1 var(--brand-sans)}
.ag-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 20px}
.ag-counts>div{display:flex;align-items:center;gap:13px;border:1px solid #e9dad4;background:#fcf1ea;border-radius:14px;padding:14px 20px}
.ag-counts>div:nth-child(2){background:#f3eef5;border-color:#e6dbe9}
.ag-counts [data-paper-art]{flex:none;width:42px;height:42px}.ag-counts strong,.ag-counts small{display:block}.ag-counts strong{font-size:25px;line-height:1.1;letter-spacing:-.04em}.ag-counts small{font-size:13px;color:#574a54}
.ag-list,.ag-workload,body[data-role=agent] .mail-layout{border:1px solid var(--ag-rule);border-radius:16px;background:white;box-shadow:0 3px 12px #3f233406}
.ag-list-heading{padding:18px 20px 0}.ag-list-heading h2{font-size:18px;margin:0;letter-spacing:-.025em}
.ag-filters{display:flex;align-items:end;gap:10px;margin:0;padding:12px 20px 16px;border-bottom:1px solid var(--ag-rule)}
.ag-filters label{display:block;min-width:0;flex:0 1 190px;margin:0;color:#55434e;font-size:12px;font-weight:650}.ag-filters label:first-child{flex:1}
body[data-role=agent] .portal-main .ag-filters :is(input,select){display:block;margin:4px 0 0;width:100%;min-height:40px;border:1px solid #dcd3d9;border-radius:8px;background:#fcfafb;font-size:14px;color:var(--ag-ink)}
.ag-list [data-ag-status] p{padding:10px 20px;margin:0;font-size:14px;color:#65394f}.ag-list [role=alert]{background:#fff3eb}
.ag-jobs{list-style:none;margin:0;padding:0}.ag-job-row{display:grid;align-items:center;grid-template-columns:38px minmax(0,1fr) minmax(115px,150px) 65px minmax(100px,155px);gap:12px;padding:14px 20px}
.ag-jobs li+li{border-top:1px solid #eee8ed}.ag-company-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;color:#5f344e;background:#f5e6ee;font-size:13px;font-weight:700}
.ag-job-title{min-width:0;overflow-wrap:anywhere}.ag-job-title strong,.ag-job-title small{display:block}.ag-job-title strong{font-size:16px}.ag-job-title small,.ag-date{font-size:13px;color:var(--ag-muted)}
.ag-stage{justify-self:start;padding:4px 9px;border-radius:30px;color:#5b4254;background:#f2eaf0;font-size:12px;font-weight:650}.ag-stage[data-stage=ready],.ag-stage[data-stage=done]{background:#e7f1eb;color:#31543e}.ag-stage[data-stage=waiting]{background:#fbecdd;color:#794927}
.ag-empty{display:grid;justify-items:center;align-content:center;text-align:center;padding:25px 16px 30px;gap:5px}.ag-empty [data-paper-art]{width:52px;height:52px;margin-bottom:3px}.ag-empty h3{font-size:17px;margin:0}.ag-empty p{color:var(--ag-muted);font-size:14px;margin:0;max-width:52ch}
.ag-text,.ag-empty a{border:0;background:none;color:#642c50;text-decoration:underline;text-underline-offset:3px;cursor:pointer;font:650 14px var(--brand-sans)}
.ag-workload{margin:0 0 14px;padding:12px 18px}.ag-workload summary{cursor:pointer;font-weight:650}.ag-workload .agent-stats{margin:12px 0 0}
body[data-role=agent] #client-dialog:has([data-work-key]){width:min(1080px,94vw);max-height:90dvh;padding:clamp(16px,2vw,28px);border:1px solid var(--ag-rule);border-radius:16px;background:#fff;color:var(--ag-ink)}
body[data-role=agent] #client-dialog::backdrop{background:#30203060}
body[data-role=agent] #client-dialog h3{font-size:17px;letter-spacing:-.025em}
body[data-role=agent] .agent-packet{gap:20px}.agent-packet pre{white-space:pre-wrap;overflow-wrap:anywhere}
body[data-role=agent] .agent-packet aside{min-width:0;background:#faf6f8;border:1px solid var(--ag-rule);border-radius:12px;padding:16px}
body[data-role=agent] #client-dialog [data-work-op=submit]{background:#fbf8fa;border:1px solid var(--ag-rule);border-radius:12px;padding:14px}
body[data-role=agent] .mail-layout{padding:18px;gap:18px}body[data-role=agent] .mail-list-head h3{margin:0;font-size:18px}
body[data-role=agent] .mail-row[aria-pressed=true]{background:#f4eaf0;box-shadow:inset 3px 0 #805170}
body[data-role=agent] #mail-detail:has(>p:only-child){display:grid;place-content:center;min-height:145px;text-align:center;border-radius:12px;background:#faf7f9;color:#685662}
body[data-role=agent] :is(a,button,summary,input,textarea,select):focus-visible{outline:2px solid #874c71;outline-offset:2px}
@media(max-width:800px){
 body[data-role=agent] #site-header{height:54px;min-height:54px;padding:7px 16px}
 body[data-role=agent] #site-header .ag-nav{position:fixed;inset:auto 0 0;z-index:61;display:flex;justify-content:space-around;gap:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--ag-rule);border-radius:0;background:#fff}
 #site-header .ag-nav a{display:flex;flex:1;flex-direction:column;gap:2px;justify-content:center;min-width:0;min-height:47px;padding:4px 2px;font-size:12px}
 #site-header .ag-nav a[aria-current=page]{box-shadow:none;background:#f4e8ef}
 .ag-short{display:inline}.ag-wide{display:none}
 body[data-role=agent] .portal-main{padding-bottom:calc(82px + env(safe-area-inset-bottom))}
 .ag-update{flex-direction:column-reverse;gap:2px}.ag-counts>div{padding:12px;gap:8px}.ag-counts [data-paper-art]{width:31px;height:31px}
 .ag-job-row{grid-template-columns:32px minmax(0,1fr) auto;gap:5px 9px;padding:12px 14px}.ag-company-mark{width:32px;height:32px}
 .ag-job-title{grid-column:2/4}.ag-stage{grid-column:2}.ag-jobs .btn{grid-column:3;grid-row:2/4}.ag-date{grid-column:2;grid-row:3}
 body[data-role=agent] .agent-packet{display:flex;flex-direction:column}.agent-answers{table-layout:fixed;width:100%}.agent-answers td,.agent-answers th{overflow-wrap:anywhere}.agent-answers td:last-child,.agent-answers th:last-child{width:55px}
 body[data-role=agent] #client-dialog:has([data-work-key]){width:100%;max-width:100vw;max-height:100dvh;margin:auto 0 0;border-radius:14px 14px 0 0}
}
@media(max-width:580px){
 .ag-heading{gap:8px;align-items:start;margin-bottom:14px}.ag-heading p{font-size:13px}
 .ag-counts{gap:5px;margin-bottom:14px}.ag-counts>div{display:block;padding:10px 8px;border-radius:10px}.ag-counts [data-paper-art]{display:none}.ag-counts strong{font-size:21px}.ag-counts small{font-size:12px}
 .ag-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:10px 13px}.ag-filters label:first-child{grid-column:1/-1}.ag-filters>button{justify-self:start}
 .ag-list-heading{padding:14px 13px 0}.ag-empty{padding:18px 12px}
 body[data-role=agent] .mail-layout{display:block;padding:13px}body[data-role=agent] .mail-list{border:0;padding:0}body[data-role=agent] #mail-detail{margin-top:15px}
 body[data-role=agent] #mail-detail:has(>p:only-child){min-height:50px}
 body[data-role=agent] #client-dialog :is(input,select,textarea){min-width:0;max-width:100%}
}
body[data-staff-login]{background:#faf7f9;color:#392738}body[data-staff-login] .auth-card{border:1px solid #e7dce3;border-radius:18px;background:white;box-shadow:0 6px 24px #49263809}body[data-staff-login] .auth-primary{background:#543047;border-radius:9px}body[data-staff-login] .staff-auth-layout{padding-inline:clamp(12px,4vw,32px)}
.ag-back{display:inline-block;padding:4px 0 12px;font:650 14px var(--brand-sans);color:#673550;text-decoration:none}
.ag-back:hover{text-decoration:underline}
.ag-thread-back{display:none}
@media(max-width:580px){
 body[data-role=agent] .ag-thread-open .mail-list,body[data-role=agent] .mail-layout:not(.ag-thread-open) #mail-detail{display:none}
 body[data-role=agent] .ag-thread-open .ag-thread-back{display:inline-flex;align-items:center;min-height:44px}
}
.ag-card>[data-work-key]{margin-top:12px;background:white;border:1px solid var(--ag-rule);border-radius:15px;padding:clamp(14px,2vw,24px);overflow-wrap:anywhere}
.ag-card>[data-work-key]>p{margin:3px 0 10px;color:var(--ag-muted)}
.ag-card [data-work-op]{display:grid;align-items:start;gap:10px;margin:12px 0}
.ag-card [data-work-op]>.btn{justify-self:start}
.ag-card [data-work-op=submit]{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;background:#faf7f9;border-radius:10px}
.ag-card [data-work-op=submit] :is(small,.checkbox,button){grid-column:1/-1}
.ag-card [data-work-op] input,.ag-card [data-work-op] select,.ag-card [data-work-op] textarea{min-width:0;max-width:100%}
.ag-card .agent-answers{table-layout:fixed}.ag-card .agent-answers th:first-child{width:34%}.ag-card .agent-answers th:last-child{width:70px}
.ag-card .agent-packet{margin:18px 0 0;border-top:1px solid var(--ag-rule);padding-top:12px}
.ag-card .agent-packet summary,.ag-card .agent-copy{color:#622e50}.ag-card .agent-copy{border:1px solid #ddced8;border-radius:6px;background:white;text-decoration:none}
.ag-card [data-ag-changed] p{padding:10px 12px;background:#fff1e6;border-radius:8px}
@media(max-width:640px){.ag-card [data-work-op=submit]{grid-template-columns:minmax(0,1fr)}.ag-card .agent-answers :is(th,td){padding:8px 5px;font-size:13px}.ag-card .agent-answers th:last-child{width:50px}}

/* Agent application card */
.ag-assignment-head{display:flex;align-items:center;gap:14px;padding:12px 0 16px;border-bottom:1px solid var(--ag-rule)}
.ag-assignment-head>[data-paper-art]{width:52px;height:52px;flex:none}
.ag-assignment-head p{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 5px;font-size:14px;font-weight:650;color:#685161}
body[data-role=agent] .ag-assignment-head h1{font-size:clamp(24px,2.6vw,35px);line-height:1.16;overflow-wrap:anywhere}
.ag-card .ag-stage-note{border-left:3px solid #99667c;padding:8px 12px;background:#f6edf2}
.ag-card>[data-work-key]{border:0;background:transparent;padding:0;border-radius:0}
.ag-card [data-work-key]>form,.ag-card .ag-outcome{margin:12px 0 16px}
.ag-card .ag-outcome,.ag-card .ag-files,.ag-card .ag-answers{border:1px solid var(--ag-rule);border-radius:14px;background:#fff}
.ag-card .ag-outcome{padding:0 16px;background:#fcf4ee;border-color:#e9d8cb}
.ag-card .ag-outcome [data-work-op=submit]{display:block;padding:0;border:0;background:transparent}
.ag-card [data-outcome-fields]:not([hidden]){display:grid;gap:12px;margin-top:12px}
.ag-card [data-outcome-fields] .btn{justify-self:start}
.ag-packet-grid{display:grid;grid-template-columns:minmax(220px,0.7fr) minmax(0,1.3fr);align-items:start;gap:14px;margin:14px 0}
.ag-card .ag-files,.ag-card .ag-answers{padding:clamp(14px,2vw,22px);min-width:0}
.ag-card .ag-files{background:#fbf6f3;border-color:#e9dcd4}
.ag-packet-grid h2{font:680 19px/1.25 var(--brand-sans);letter-spacing:-.025em;margin:0 0 12px}
.ag-group-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px}
.ag-group-head h2{margin:0}
.ag-files h3{margin:18px 0 4px;font-size:15px}.ag-files p{margin:3px 0 10px;font-size:14px}
.ag-card .ag-files pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:14px}
.ag-answer-group dl{margin:0}.ag-answer-group dl>div{display:grid;grid-template-columns:minmax(85px,.55fr) minmax(0,1.45fr);gap:12px;align-items:center;border-top:1px solid #eee7eb;padding:6px 0}
.ag-answer-group dt{font-size:13px;font-weight:550;color:#6a5965}
.ag-answer-group dd{margin:0;display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:14px}
.ag-answer-group+.ag-answer-group{margin-top:18px}
.ag-card .agent-copy{font:600 12px var(--brand-sans);padding:5px 9px;min-height:34px;cursor:pointer}
.ag-card .ag-record-extras{border-top:1px solid var(--ag-rule);margin-top:14px}
.ag-card .ag-record-extras details,.ag-card .ag-packet-grid details{margin:6px 0;padding:0;background:transparent;border:0}
.ag-card :is(.ag-record-extras,.ag-packet-grid) summary{font-size:14px;font-weight:650;color:#693c56;padding:10px 0;cursor:pointer}
.ag-card .ag-answers>details{border-top:1px solid var(--ag-rule)}
.ag-card .ag-answers details li{font-size:14px;line-height:1.45}
.ag-card .ag-record-extras>details+details{border-top:1px solid var(--ag-rule)}
.ag-card button[data-work-packet][hidden]{display:none!important}
@media(max-width:760px){
 .ag-packet-grid{grid-template-columns:minmax(0,1fr)}
 .ag-assignment-head>[data-paper-art]{width:38px;height:38px}
 .ag-assignment-head{gap:10px;padding-top:4px}
 .ag-answer-group dl>div{grid-template-columns:minmax(78px,.58fr) minmax(0,1.42fr);gap:6px}
 .ag-card .agent-copy,.ag-card :is(.ag-record-extras,.ag-packet-grid) summary{min-height:44px}
}
a.ag-job-row{color:inherit;text-decoration:none}
a.ag-job-row:hover,a.ag-job-row:focus-visible{background:#faf5f8}
body[data-role=agent] a.ag-job-row:focus-visible{outline-offset:-2px}
a.ag-job-row:hover .ag-job-title strong,a.ag-job-row:focus-visible .ag-job-title strong{text-decoration:underline;text-underline-offset:3px}
.ag-owner{font-size:14px;font-weight:650;overflow-wrap:anywhere}
.ag-owner small{display:block;color:var(--ag-muted);font-size:12px;font-weight:500}
@media(max-width:800px){.ag-owner{grid-column:3;grid-row:2/4;max-width:15ch;text-align:end}}
.ag-job-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;margin:16px 0}
.ag-job-facts dt{font-size:13px;color:var(--ag-muted)}
.ag-job-facts dd{display:flex;align-items:center;gap:10px;overflow-wrap:anywhere;margin:3px 0 0}
.ag-job-facts button{flex:none;min-height:36px}
.ag-client-notes{padding:12px 16px;border-inline-start:3px solid #bc869d;border-radius:6px;background:#faf4f6}
.ag-client-notes h2{margin:0;font-size:16px}
.ag-client-note{margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:580px){.ag-job-facts{grid-template-columns:minmax(0,1fr);gap:8px}.ag-job-facts dd{justify-content:space-between}.ag-job-facts button{min-height:44px}.ag-assignment-head{flex-wrap:wrap}}
