/* Staff portal — mirrors the Tune Desk extension black/orange admin theme. */
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;font:14px/1.45 system-ui,-apple-system,sans-serif;color:#ededed;background:#080808;overflow:hidden}
.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px}
.auth-card{width:min(390px,100%);padding:28px;background:#141414;border:1px solid #3d3025;border-top:3px solid #ef7d22;border-radius:14px;display:grid;gap:12px}
.auth-card .brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:#050505 url('/portal/brand-logo.png') center/cover no-repeat;color:transparent;font-size:0}
.desk-veil-mark>span{background:#050505 url('/portal/brand-logo.png') center/cover no-repeat;color:transparent;font-size:0}
.auth-card h1{margin:0;font-size:24px}.auth-card p{margin:0;color:#b5b5b5}.auth-card label{font-size:12px;color:#ffad67;font-weight:700}
.auth-card input{padding:13px;border:1px solid #555;border-radius:9px;background:#090909;color:white;font:inherit;font-size:20px;letter-spacing:.2em;text-align:center}
.auth-card input:focus{outline:2px solid #ef7d22}.auth-card button{width:100%;padding:12px}
#auth-qr{padding:12px;background:white;border-radius:9px;display:grid;place-items:center}#auth-qr img{width:min(230px,100%);height:auto}
.auth-secret{font-size:12px;overflow-wrap:anywhere}#auth-error{color:#ff987b!important;font-size:12px}
button{border:1px solid #454545;border-radius:9px;padding:8px 12px;background:#202020;color:#e5e5e5;cursor:pointer;font-weight:650}
/* Text boxes use the UI font (browsers default textareas to monospace). */
textarea{font-family:inherit;font-size:14px;line-height:1.45}
button:hover{background:#303030;border-color:#a46a33}
button.primary{background:#ef7d22;border-color:#ef7d22;color:#fff}
button.primary:hover{background:#cf6310}
.muted{color:#a1a1a1}
#desk-panel{display:flex;flex-direction:column;width:100vw;height:100vh;background:#080808;overflow:hidden}
#desk-head{display:flex;align-items:center;gap:10px;min-height:68px;padding:0 22px;background:#050505;border-bottom:1px solid #292929}
#desk-head .brand{display:flex;align-items:center;gap:11px;margin-right:24px}
#desk-head .brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#050505 url('/portal/brand-logo.png') center/cover no-repeat;color:transparent;font-size:0}
#desk-head .brand-name{font-size:17px;font-weight:750;letter-spacing:-.02em;white-space:nowrap}
#desk-head button{background:transparent;color:#dedede;border-color:transparent}
#desk-head button:hover{background:#252525}
#desk-head button[aria-current="true"]{background:#4a2a12;color:#fff}
#desk-head #enable-sound{border-color:#a85c1c;color:#ffad67;white-space:nowrap}
#desk-head #desk-search{flex:1;max-width:440px;margin:0 auto}
#desk-sort{max-width:160px;padding:8px 10px;border:1px solid #404040;border-radius:9px;background:#171717;color:#ededed;font:inherit}
#desk-sort:focus{outline:2px solid #ef7d22;outline-offset:1px}
#desk-direction{min-width:36px;border-color:#404040!important}
#desk-head #msg-toggle{border-color:#7b481f;color:#ffb16b;white-space:nowrap}
#desk-head #msg-toggle[aria-expanded="true"]{background:#4a2a12;color:#fff}
#desk-head #desk-focus{white-space:nowrap}
#desk-head #desk-focus[aria-pressed="true"]{background:#4a2a12;color:#ffb16b}
#desk-head #msg-toggle:disabled{opacity:.45;cursor:not-allowed}
#desk-head #msg-toggle{display:inline-flex;align-items:center;gap:6px}
.chat-badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#F26A21;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
.chat-badge[hidden]{display:none}
#desk-body-shell{flex:1;min-height:0;min-width:0;display:flex;overflow:hidden}
#desk-content{order:0;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}
#msg-sidebar{order:1;flex:0 0 0;min-width:0;min-height:0;overflow:hidden;border-left:0 solid #75471f;background:#101010;visibility:hidden;transition:flex-basis .2s ease,border-width .2s ease;pointer-events:none}
#desk-body-shell.chat-open #msg-sidebar{flex-basis:clamp(300px,30vw,410px);border-left-width:1px;visibility:visible;pointer-events:auto}
@media(prefers-reduced-motion:reduce){#msg-sidebar{transition:none}}
#table-col{min-width:0;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent;container-type:inline-size;container-name:reqlist}
#workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding:20px 24px 24px}
#workspace.detail-open{grid-template-columns:minmax(280px,1fr) 14px minmax(340px,var(--detail-width,44%));gap:0}
#desk-body-shell.chat-open #workspace.detail-open{grid-template-columns:minmax(280px,1fr) 14px minmax(340px,min(var(--chat-detail-width,44%),calc(100% - 294px)))}
#detail-resize{position:relative;cursor:col-resize;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
#detail-resize::after{content:"";position:absolute;top:12px;bottom:12px;left:6px;width:2px;border-radius:2px;background:#4c3322}
#detail-resize:hover::after,#detail-resize:focus-visible::after{background:#ef7d22}
#detail-pane{margin:0;border:1px solid #50331e;border-radius:12px;background:#0b0b0b;overflow:hidden;height:100%;min-height:0;align-self:stretch;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
#detail-pane[hidden]{display:none}
#detail-body{display:flex;flex-direction:column;height:100%;padding:0}
.detail-scroll{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
.detail-scroll::-webkit-scrollbar{width:8px}
.detail-scroll::-webkit-scrollbar-thumb{background:#3a3a3a;border-radius:4px}
.detail-scroll::-webkit-scrollbar-track{background:transparent}
.detail-head{display:flex;justify-content:space-between;gap:16px;align-items:start;padding-bottom:14px;border-bottom:1px solid #303030}
.detail-head h3{margin:4px 0;color:#f0f4fb;font-size:20px}
.detail-closebox{display:flex;gap:8px;align-items:center}
#detail-close{background:transparent;border-color:#404040;font-size:14px}
.dashboard-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
#desk-search{width:min(360px,100%);padding:10px 12px 10px 38px;border:1px solid #373737;border-radius:10px;outline:none;background:#141414 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23858585' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.8-3.8'/%3E%3C/svg%3E") no-repeat 13px center;color:#f0f0f0;box-shadow:0 2px 10px #0008}
#desk-search::placeholder{color:#858585}
#desk-search:focus{border-color:#ef7d22;box-shadow:0 0 0 3px #ef7d2233}
.dash-tabs{position:sticky;top:0;z-index:3;display:flex;width:100%;margin:0;border:1px solid #373737;border-bottom:0;border-radius:10px 10px 0 0;background:#161616;overflow:hidden}
.dash-tab{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;gap:9px;padding:13px 12px;border:0;border-right:1px solid #2c2c2c;border-radius:0;background:transparent;color:#a9a9a9;font-weight:700;font-size:13.5px;cursor:pointer;white-space:nowrap;box-shadow:inset 0 -2px 0 #262626;transition:background .15s,color .15s,box-shadow .15s}
.dash-tab:last-child{border-right:0}
.dash-tab:hover{background:#1c1c1c;color:#e6e6e6}
.dash-tab:focus-visible{outline:2px solid #ef7d22;outline-offset:-2px}
.dash-tab-label{overflow:hidden;text-overflow:ellipsis}
.dash-tab-short{display:none}
/* When the list column is narrow (detail pane / Contact Chef open), switch to short labels so the
   strip never truncates mid-word. */
@container reqlist (max-width:560px){.dash-tab{padding:12px 6px;gap:6px;font-size:12.5px}.dash-tab-full{display:none}.dash-tab-short{display:inline}}
.dash-tab-count{flex:none;min-width:22px;padding:1px 7px;border-radius:999px;background:#2a2a2a;color:#cfcfcf;font-size:11px;font-weight:800;text-align:center}
/* Selected: bright label + solid orange underline, joined to the table below. */
.dash-tab.active{background:#1f1a16;color:#fff;box-shadow:inset 0 -3px 0 #ef7d22}
.dash-tab.active .dash-tab-count{background:#ef7d22;color:#1a1004}
/* Needs attention (a tab you are not on): glowing dot + a pulsing tint, distinct from selected. */
.dash-tab.blink{color:#ffb878;animation:dash-tab-blink 1.1s ease-in-out infinite}
.dash-tab.blink::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#ef7d22;box-shadow:0 0 9px #ef7d22}
.dash-tab.blink .dash-tab-count{background:#4a2c12;color:#ffc48a}
@keyframes dash-tab-blink{0%,100%{background:transparent}50%{background:#2e1c0e}}
@media(prefers-reduced-motion:reduce){.dash-tab.blink{animation:none;background:#2a1a0e}}
.req-table .dash-empty td{color:#8a8a8a;text-align:center;padding:26px 15px}
.req-table{width:100%;border-collapse:collapse;background:#121212;border:1px solid #373737;border-radius:0 0 10px 10px;overflow:hidden}
.req-table th,.req-table td{padding:13px 15px;border-bottom:1px solid #303030;text-align:left;color:#e1e1e1}
.req-table th{background:#1c1c1c;color:#aaa;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.04em}
.req-table th[data-sort]{cursor:pointer;user-select:none}
.req-table th[data-sort]:hover,.req-table th[data-sort]:focus{color:#ffad67;outline:none}
.req-table th[aria-sort="ascending"]::after{content:" ↑";color:#ffad67}
.req-table th[aria-sort="descending"]::after{content:" ↓";color:#ffad67}
.req-table .manual-order{white-space:nowrap;width:82px}
.req-table .manual-order button{padding:3px 7px;border-radius:5px;margin-right:3px}
.req-table tr.dragging{opacity:.45}
.req-table tr[data-key]{cursor:pointer}
.req-table tr:hover td{background:#222}
/* Attention rows (new request / new customer comment) get a STATIC highlight, not a blink.
   The table rebuilds on every refresh, so an animation re-fired each render and looked like
   perpetual blinking. A static orange accent marks the row without flashing. */
.req-table tr.reply-pulse td{background:#2b1d13;border-left-color:#ed7b24}
.req-table tr.reply-pulse td:first-child{box-shadow:inset 3px 0 #ef7d22}
.req-table tr[aria-current="true"] td{background:#282018}
.req-table{table-layout:fixed}
.req-table th:nth-last-child(3),.req-table td:nth-last-child(3){width:43%}
.req-table th:nth-last-child(2),.req-table td:nth-last-child(2){width:36%}
.req-table th:last-child,.req-table td:last-child{width:21%}
.chat-open .req-table .age-col{display:none}
.chat-open .req-table th[data-sort="customer"],.chat-open .req-table .customer-td{width:55%}
.chat-open .req-table th[data-sort="needs"],.chat-open .req-table td:nth-last-child(2){width:45%}
.req-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-cell{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%}
.customer-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The Needs label is the action cue — wrap it rather than cut it off when the list is narrow. */
.req-table td.needs-td{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.lockbadge{display:inline-block;flex:none;max-width:min(84px,52%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 5px;border-radius:4px;background:#402711;color:#ffb16b;font-size:10px;line-height:1.35;font-weight:700;vertical-align:middle}
.lockbadge.mine{background:#1d3a24;color:#8fd694}
.viewbadge{display:inline-block;flex:none;max-width:min(110px,55%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 5px;border-radius:4px;background:#26333a;color:#9bc9d6;font-size:10px;line-height:1.35;vertical-align:middle}
.settled-label{margin:12px 26px 0;padding:9px 14px;border:1px solid #373737;border-left:3px solid #ef7d22;border-radius:6px;background:#141414;color:#ababab;font-size:12px}
.taken-banner{margin:12px 26px 0;padding:10px 14px;border:1px solid #84452d;border-radius:8px;background:#291b17;color:#ffac82;font-size:12px}
button:disabled{opacity:.45;cursor:not-allowed}
/* Slide-in detail drawer */
#drawer-backdrop{position:fixed;inset:0;background:#000a;z-index:40}
#drawer-backdrop[hidden]{display:none}
#drawer{position:fixed;top:0;right:0;height:100vh;width:min(600px,94vw);z-index:50;background:#0b0b0b;border-left:1px solid #50331e;box-shadow:-18px 0 60px #000b;transform:translateX(30px);opacity:0;transition:transform .18s ease-out,opacity .18s ease-out;overflow-y:auto}
#drawer.open{transform:none;opacity:1}
#drawer[hidden]{display:none}
#drawer-body{padding:20px 22px 28px}
.drawer-head{display:flex;justify-content:space-between;gap:16px;align-items:start;padding-bottom:14px;border-bottom:1px solid #303030}
.drawer-head h3{margin:4px 0;color:#f0f4fb;font-size:20px}
#drawer-close{background:transparent;border-color:#404040;font-size:14px}
.stage-row{margin:14px 0 4px}
@media(max-width:650px){#workspace{padding:16px}}
@media(max-width:760px){#desk-head{flex-wrap:wrap;padding:10px 14px}#desk-head #desk-search{order:2;flex-basis:100%;max-width:none;margin:0}.req-table th,.req-table td{padding:9px 7px}}
@media(max-width:1100px){#workspace.detail-open{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 14px minmax(180px,var(--detail-height,45vh))}#detail-resize{cursor:row-resize}#detail-resize::after{top:6px;bottom:auto;left:12px;right:12px;width:auto;height:2px}#detail-pane{max-height:none}}
#detail-pane::-webkit-scrollbar,.thread::-webkit-scrollbar{width:8px}
#detail-pane::-webkit-scrollbar-thumb,.thread::-webkit-scrollbar-thumb{background:#3a3a3a;border-radius:4px}
#detail-pane::-webkit-scrollbar-track,.thread::-webkit-scrollbar-track{background:transparent}
#presence{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:8px 22px;background:#101010;border-bottom:1px solid #2d2d2d;font-size:12px;color:#aaa}
#presence .who{background:#242424;border:1px solid #444;border-radius:12px;padding:2px 10px;color:#e1e1e1}
#presence .viewing{color:#ffae63}
#desk-body{flex:1;display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);min-height:0}
#desk-left{min-height:0;display:flex;flex-direction:column;background:#0d0d0d;border-right:1px solid #303030}
.list-heading{display:flex;justify-content:space-between;align-items:baseline;padding:18px 18px 8px}
.list-heading strong{font-size:16px;font-weight:750;color:#ededed}
.list-heading span{color:#999;font-size:11px}
#desk-search{margin:8px 12px 12px;padding:10px 12px;border:1px solid #373737;border-radius:9px;outline:none;color:#f0f0f0;background:#1a1a1a}
#desk-search:focus{border-color:#ef7d22}
#desk-list{overflow:auto;padding:0 8px 14px}
#desk-list button{display:block;width:100%;text-align:left;border:1px solid transparent;border-left:3px solid transparent;border-radius:8px;background:transparent;color:#e1e1e1;padding:11px 12px;margin-bottom:4px;cursor:pointer}
#desk-list button span{display:block;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#desk-list button small{display:block;color:#a5a5a5;margin-top:3px;line-height:1.35}
#desk-list button:hover{background:#252525}
#desk-list button[aria-current="true"]{background:#282018;border-color:#65401e;border-left-color:#ff963a}
.attention{display:inline-block;width:fit-content;margin-top:6px;padding:3px 8px;border-radius:5px;background:#242424;color:#aaa;font-size:11px;font-weight:650}
.attention.hot{background:#402711;color:#ffb16b}
#desk-detail{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#080808}
.detail-head{flex:none;display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 26px;background:#101010;border-bottom:1px solid #303030}
.eyebrow{display:block;margin-bottom:5px;color:#ffa757;font-size:10px;font-weight:800;letter-spacing:.12em}
#desk-detail h3{margin:0;color:#f0f4fb;font-size:21px;font-weight:750;letter-spacing:-.025em}
.detail-subtitle{margin:4px 0 0;color:#aaa;font-size:12px;overflow-wrap:anywhere}
.stage-box{display:grid;gap:5px;min-width:170px;color:#aaa;font-size:11px;font-weight:700}
.stage-pill{padding:8px 10px;border:1px solid #454545;border-radius:8px;background:#202020;color:#ededed;font-weight:700}
.conversation{flex:1;min-height:160px;display:flex;flex-direction:column;margin:10px 18px 16px;border:1px solid #303030;border-radius:12px;background:#121212;overflow:hidden}
.conversation-head{flex:none;display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid #303030}
.conversation-head h4{margin:0;color:#e9e9e9;font-size:14px}
.live-label{color:#ffae63;font-size:11px;font-weight:700}
.thread{flex:1;min-height:0;overflow-y:auto;padding:14px 16px 18px;background:#0b0b0b}
.history{width:min(780px,94%);margin:0 0 12px;padding:11px 13px;border:1px solid #373737;border-radius:11px;background:#1c1c1c}
.history-meta{display:flex;gap:12px;justify-content:space-between;align-items:baseline;color:#a8a8a8;font-size:11px}
.history-meta strong{color:#ffad67;font-weight:750}
.history-message{margin-top:6px;color:#e7e7e7;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.composer{flex:none;padding:12px 16px 13px;border-top:1px solid #303030;background:#121212}
.composer textarea{display:block;width:100%;min-height:70px;max-height:180px;resize:vertical;padding:10px 12px;border:1px solid #424242;border-radius:9px;outline:none;color:#f0f0f0;background:#101010}
.composer textarea:focus{border-color:#ef7d22}
.composer-foot{display:flex;justify-content:space-between;align-items:center;margin-top:8px;color:#a8a8a8;font-size:11px;flex-wrap:wrap;gap:6px}
/* Extension-identical detail classes */
.bm3-detail-head{flex:none;display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 20px;align-items:flex-start;padding:18px 22px 16px;background:#101010;border-bottom:1px solid #303030}
.bm3-detail-head>div:first-child{flex:1 1 220px;min-width:200px}
.bm3-eyebrow{display:block;margin-bottom:5px;color:#ffa757;font-size:10px;font-weight:800;letter-spacing:.12em}
.bm3-detail-head h3{margin:0;color:#f0f4fb;font-size:21px;font-weight:750;letter-spacing:-.025em}
.bm3-detail-subtitle{margin:4px 0 0;color:#aaa;font-size:12px;overflow-wrap:anywhere}
.bm3-job-actions{flex:0 1 auto;min-width:0;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px}
.stage-toggle{display:flex;align-items:center;gap:8px}
.stage-label{display:flex;align-items:center;gap:8px;color:#9aa;font-size:12px;font-weight:700;white-space:nowrap}
.stage-note{flex-basis:100%;white-space:normal;max-width:320px;text-align:right;color:#9aa;font-size:12px}
.bm3-stage-box{display:grid;gap:5px;min-width:170px;color:#aaa;font-size:11px;font-weight:700}
.bm3-stage{width:100%;padding:8px 10px;border:1px solid #454545;border-radius:8px;background:#202020;color:#ededed;font-weight:700}
.bm3-muted{color:#a1a1a1}
.bm3-conversation{flex:1;min-height:0;display:flex;flex-direction:column;margin:10px 18px 16px;border:1px solid #303030;border-radius:12px;background:#121212;overflow:hidden}
.bm3-conversation-head{flex:none;display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid #303030}
.bm3-conversation-head h4{margin:0;color:#e9e9e9;font-size:14px}
.bm3-live-label{color:#ffae63;font-size:11px;font-weight:700;margin-left:auto}
.thread-flat{padding:12px 18px;display:flex;flex-direction:column;gap:6px}
.thread-flat .bm3-history{margin:0}
.msg-card{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;padding:16px;
  /* Internal-chat wallpaper: dark carbon weave + faint brand glow, so it is never mistaken for the customer thread. */
  background:radial-gradient(120% 55% at 50% 0%,rgba(239,125,34,.10),transparent 62%),
    linear-gradient(180deg,rgba(0,0,0,.10),rgba(0,0,0,.50)),
    url('/portal/chat-bg.svg') 0 0/18px 18px repeat,#0b0c0e}
.msg-head{background:rgba(11,12,14,.72);margin:-16px -16px 0;padding:16px 16px 12px;backdrop-filter:blur(2px)}
.msg-compose textarea{background:rgba(10,10,12,.92)}
/* Customer reply paused while Contact Chef is open. */
.bm3-reply-row.chat-locked textarea{opacity:.5;cursor:not-allowed}
.chat-lock-note{margin:0 0 8px;padding:8px 11px;border:1px dashed #6b4320;border-radius:8px;background:#1a120b;color:#ffbd86;font-size:12px}
.msg-head{display:flex;justify-content:space-between;gap:16px;align-items:start;padding-bottom:12px;border-bottom:1px solid #303030}
.msg-head h3{margin:4px 0;color:#ffad67}
.msg-thread{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding:12px 4px;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
.msg-row{display:flex;margin:0}
.msg-row.mine{justify-content:flex-end}
.msg-bubble{max-width:80%;padding:5px 8px 3px;border-radius:9px;background:#242424}
.msg-row.mine .msg-bubble{background:#6a401d;border-bottom-right-radius:3px}
.msg-row:not(.mine) .msg-bubble{border-bottom-left-radius:3px}
.msg-name{display:block;font-size:10.5px;font-weight:700;color:#ffad67;margin-bottom:1px}
.msg-row .msg-text{color:#ededed;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.4}
.msg-time{display:block;text-align:right;font-size:10px;color:#a8a8a8;margin-top:2px}
.msg-row.mine .msg-time{color:#e8c7a6}
.msg-screenshot{display:block;max-width:100%;max-height:180px;margin-top:8px;border:1px solid #75471f;border-radius:6px;object-fit:contain}
.msg-screenshot-open{display:block;max-width:100%;padding:0;border:0;background:transparent;cursor:zoom-in}
.msg-screenshot-open:focus-visible{outline:2px solid #ffad67;outline-offset:3px}
#screenshot-viewer{width:96vw;height:94vh;height:94dvh;max-width:1400px;max-height:none;padding:0;border:1px solid #424242;border-radius:12px;background:#101010;color:#ededed;overflow:hidden}
#screenshot-viewer[open]{display:flex;flex-direction:column}
#screenshot-viewer::backdrop{background:rgba(0,0,0,.82)}
.screenshot-viewer-head{display:flex;align-items:center;gap:8px;padding:12px;border-bottom:1px solid #424242;flex-shrink:0}
.screenshot-viewer-head h2{flex:1;min-width:0;margin:0;font-size:15px}
.screenshot-viewer-head button{min-height:44px;flex-shrink:0}
.screenshot-viewer-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:12px;overflow:auto;overscroll-behavior:contain}
.screenshot-viewer-image{display:block;max-width:100%;max-height:100%;object-fit:contain}
.screenshot-viewer-image[hidden],.screenshot-viewer-status[hidden]{display:none}
.screenshot-viewer-status{max-width:32em;text-align:center;color:#c6c6c6}
.screenshot-viewer-expanded .screenshot-viewer-stage{display:block}
.screenshot-viewer-expanded .screenshot-viewer-image{max-width:none;max-height:none;margin:0 auto}
@media(max-width:600px){
  #screenshot-viewer{width:100%;height:100vh;height:100dvh;max-width:none;margin:0;border:0;border-radius:0}
  .screenshot-viewer-head{padding:calc(8px + env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left));gap:6px}
  .screenshot-viewer-head h2{font-size:13px}
  .screenshot-viewer-head button{padding:8px;font-size:12px}
  .screenshot-viewer-stage{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
#msg-text{width:100%;min-height:80px;resize:vertical;background:#101010;border:1px solid #424242;color:#f0f0f0;border-radius:9px;padding:10px 12px;margin-top:6px}
#msg-text:focus{border-color:#6a6a6a;outline:none}
#msg-text.has-content{border-color:#ef7d22}
.msg-attachment{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #75471f;border-radius:7px;color:#ffbd86;font-size:12px}
.msg-attachment[hidden]{display:none}
.msg-attachment button{padding:3px 6px;font-size:11px}
.msg-foot{display:flex;justify-content:flex-end;align-items:center;margin-top:10px;gap:8px}
.thread-flat .bm3-history{margin:0}
.bm3-history{width:100%;margin:0 0 6px;padding:6px 9px;border:1px solid #373737;border-radius:11px;background:#1c1c1c;box-shadow:none}
.thread-flat .bm3-history-incoming,.thread-flat .bm3-history-outgoing{width:fit-content;max-width:88%;min-width:min(220px,88%)}
.thread-flat .bm3-history-incoming{align-self:flex-start;border-top-left-radius:3px;background:#202a30;border-color:#34434c}
.thread-flat .bm3-history-outgoing{align-self:flex-end;border-top-right-radius:3px;background:#16483e;border-color:#296357}
.bm3-history-outgoing .bm3-history-meta strong{color:#93dfc2}
.bm3-history-incoming .bm3-history-meta strong{color:#b4d4e7}
.bm3-history-meta{flex-wrap:wrap}
.bm3-history.bm3-history-system{align-self:center;width:100%;max-width:100%;background:#1c1c1c;border-color:#373737;border-style:dashed;opacity:.65;font-style:italic}
.bm3-history.bm3-history-system .bm3-copy-message{display:none}
.incoming-notice{margin:0 0 10px;padding:9px 12px;border-left:3px solid #ef7d22;background:#21170f;color:#ffd6b0;font-size:12px}
.incoming-notice.incoming-stale{background:#2b1d13;color:#f3c9a0}
.incoming-retry{margin-left:6px;background:#ef7d22;color:#1a1205;border:none;border-radius:4px;padding:2px 9px;font:inherit;font-size:12px;cursor:pointer}
.incoming-retry:hover{background:#ff8c33}
.bm3-history.new-arrival{animation:new-message-glow 3s ease-out}
@keyframes new-message-glow{0%{border-color:#ff9c42;background:#35200f}100%{border-color:#373737;background:#1c1c1c}}
@media (prefers-reduced-motion:reduce){.bm3-history.new-arrival{animation:none;border-color:#ff9c42}}
.bm3-history-meta{display:flex;gap:10px;align-items:baseline;color:#a8a8a8;font-size:10.5px}
.bm3-history-meta strong{color:#ffad67;font-weight:750}
.bm3-history-meta time{margin-right:auto}
.bm3-history-message{font-size:13px;line-height:1.4;margin-top:3px;color:#e7e7e7;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.bm3-copy-message{border:0;background:transparent;color:#b7c2cf;font-size:11px;cursor:pointer;padding:0 3px}
.bm3-copy-message:hover{color:#ffad67;text-decoration:underline}
.bm3-history-continuation{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px}
.bm3-history-continuation .bm3-history-meta{grid-column:2;grid-row:1;align-self:start;justify-content:flex-end}
.bm3-history-continuation .bm3-history-message{grid-column:1;grid-row:1;margin-top:0}
.bm3-composer{flex:none;padding:12px 16px 13px;border-top:1px solid #303030;background:#121212;max-height:70%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
.bm3-composer textarea{display:block;width:100%;min-height:70px;max-height:180px;resize:vertical;padding:10px 12px;border:1px solid #424242;border-radius:9px;outline:none;color:#f0f0f0;background:#101010}
.bm3-composer textarea:focus{border-color:#ef7d22}
.bm3-reply-row{display:flex;align-items:flex-end;gap:10px}
.bm3-reply-row textarea{flex:1;min-width:0;width:auto}
.bm3-reply-row #queueBtn{flex:none;width:46px;height:46px;padding:0;display:grid;place-items:center}
.bm3-reply-row #queueBtn svg{display:block}
.reply-delivery{margin-top:8px;color:#ffbd86;font-size:12px;text-align:center}
.bm3-engine{background:#080808;border:1px solid #3b2b1c;border-left:3px solid #ef7d22;border-radius:6px;padding:10px 12px;margin:0 0 10px;max-height:32vh;overflow:auto;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
.bm3-engine h3{display:block;color:#ffb36d;font-size:13px;margin:0 0 6px}
.bm3-engine-card p{margin:6px 0;font-size:12px}
.bm3-engine-proposal{white-space:pre-wrap;font:inherit;font-size:12px;line-height:1.5;background:#000;border-left:3px solid #ff8500;padding:10px 12px;margin:8px 0;color:#e7e7e7}
.bm3-engine-card button{margin:6px 8px 6px 0}
.bm3-btn{border:1px solid #454545;border-radius:9px;padding:8px 12px;background:#202020;color:#e5e5e5;cursor:pointer;font-weight:650}
.bm3-btn:hover{background:#303030;border-color:#a46a33}
.bm3-btn.bm3-primary{background:#ef7d22;border-color:#ef7d22;color:#fff}
.bm3-btn.bm3-primary:hover{background:#cf6310}
#detail-body .bm3-composer #fwdNote{width:100%;margin-top:8px;background:#101010;border:1px solid #424242;color:#f0f0f0;border-radius:9px;padding:10px 12px}
.assist{margin:0 0 10px;padding:10px 12px;border:1px solid #3b2b1c;border-left:3px solid #ef7d22;background:#16120e;border-radius:6px;font-size:12px;white-space:pre-wrap;color:#e7e7e7}
#fwdNote{width:100%;margin-top:8px;background:#101010;border:1px solid #424242;color:#f0f0f0;border-radius:9px;padding:10px 12px}
.job-meta{padding:12px 26px;color:#a1a1a1;font-size:12px}
.job-meta h4{margin:10px 0 7px;color:#d4d4d4;font-size:12px;font-weight:750}
.fwd-banner{margin:12px 26px 0;padding:10px 14px;border:1px solid #80502d;border-radius:8px;background:#24180f;color:#ffd0a5;font-size:12px}
#desk-dashboard{flex:1;min-height:0;overflow:auto;padding:24px;background:#080808}
#desk-dashboard[hidden]{display:none!important}
#desk-body[hidden]{display:none!important}
.req-table th,.req-table td{padding:13px 15px;border-bottom:1px solid #303030;text-align:left;color:#e1e1e1}
.req-table th{background:#1c1c1c;color:#aaa;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.04em}
.req-table tr[data-key]{cursor:pointer}
.req-table tr:hover td{background:#222}
.stale{color:#c66;font-size:11px}
.mini-metrics{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 4px}
.mini-metric{font-size:11px;color:#ababab;background:#141414;border:1px solid #373737;border-top:2px solid #ef7d22;border-radius:6px;padding:3px 8px}
.mini-metric strong{color:#f5f5f5}

.bm3-test-result{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid #373737;border-radius:10px;background:#1a1a1a;margin:8px 0}
.bm3-test-result label{color:#a8a8a8;font-size:12px}
.bm3-test-result textarea{min-height:44px;resize:vertical}
.bm3-test-actions{display:flex;gap:8px}
.reply-delivery.reply-error{color:#ff8a8a}

.bm3-history.bm3-history-provisional{border-style:dashed;opacity:.8}
.bm3-history-syncing{color:#ffad67;font-weight:400;font-size:11px}

.bm3-detail-car{margin:6px 0 0;color:#a9b0ba;font-size:12.5px;line-height:1.5;overflow-wrap:anywhere}
.bm3-detail-car span{white-space:nowrap}
.bm3-detail-car span:not(:last-child)::after{content:" · ";color:#5a5f66}
.bm3-detail-car span:first-child{color:#f0f0f0;font-weight:700}

#draft{overflow:hidden;resize:none;min-height:72px;max-height:none;box-sizing:border-box}

.feed-banner{background:#7a2e00;color:#ffe3cc;padding:8px 14px;font-size:13px;font-weight:600;text-align:center}

.stage-toggle{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0;align-items:center}
.stage-label{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#8a94a0}
.stage-select{font:inherit;font-size:13px;padding:6px 10px;border-radius:8px;border:1px solid #424242;background:#141414;color:#f0f0f0}
.stage-select:focus{border-color:#ef7d22;outline:none}
.stage-select:disabled{opacity:.6}
.stage-note{font-size:11px;color:#ffbd86}

/* Staff-chat GIFs */
.msg-gif-strip { display:flex; gap:7px; overflow-x:auto; padding:7px; margin:8px 0 0; background:var(--panel,#141414); border:1px solid #2d2d2d; border-radius:9px; }
.msg-gif-pick { flex:0 0 auto; padding:0; border:1px solid #363636; border-radius:7px; background:#0d0d0d; cursor:pointer; overflow:hidden; line-height:0; }
.msg-gif-pick:hover { border-color:#F26A21; }
.msg-gif-pick img { height:82px; width:auto; display:block; }
.msg-gif-note { color:#9a9a9a; font-size:12px; padding:6px 4px; }
.msg-gif { max-width:230px; max-height:230px; border-radius:9px; margin-top:6px; display:block; }
.msg-gif-spinner { display:inline-block; width:12px; height:12px; vertical-align:-2px; border:2px solid #555; border-top-color:#F26A21; border-radius:50%; animation:msg-gif-spin .7s linear infinite; }
@keyframes msg-gif-spin { to { transform:rotate(360deg); } }

/* Composer: send/capture icons beside the input; fix hidden gif strip reserving space */
.msg-gif-strip[hidden]{display:none}
.msg-compose{display:flex;align-items:flex-end;gap:8px;margin-top:8px}
.msg-compose textarea{flex:1;min-width:0;width:auto}
.msg-icon-btn{flex:none;width:46px;height:46px;padding:0;display:grid;place-items:center;border-radius:9px;background:#2a2a2a;border:1px solid #454545;color:#eaeaea;cursor:pointer}
.msg-icon-btn:hover{border-color:#F26A21;color:#fff}
.msg-icon-btn.primary{background:#F26A21;border-color:#F26A21;color:#fff}
.msg-icon-btn svg{display:block}

.msg-icon-btn:disabled,.msg-icon-btn.primary:disabled{background:#262626;border-color:#3a3a3a;color:#6b6b6b;cursor:default}
.bm3-reply-row #queueBtn:disabled{background:#262626;border-color:#3a3a3a;color:#6b6b6b;cursor:default}

/* Payment celebration: a centered card over a dimmed, non-blocking overlay, with confetti on top. */
.pay-confetti{position:fixed;inset:0;z-index:2147483647;pointer-events:none}
.pay-overlay{position:fixed;inset:0;z-index:2147483646;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.72);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);pointer-events:none;animation:pay-fade .25s ease}
.pay-overlay.out{opacity:0;transition:opacity .5s ease}
.pay-card{text-align:center;color:#fff;padding:24px 40px;animation:pay-pop .45s cubic-bezier(.2,1.5,.4,1)}
.pay-card .pay-big-emoji{font-size:72px;line-height:1}
.pay-card .pay-head{margin-top:14px;font-size:13px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#6ee7a0}
.pay-card .pay-name{margin-top:8px;font-size:34px;font-weight:800;letter-spacing:-.02em;overflow-wrap:anywhere}
.pay-card .pay-amount{margin-top:4px;font-size:52px;font-weight:900;color:#ffd166;text-shadow:0 2px 24px rgba(255,209,102,.33)}
@keyframes pay-fade{from{opacity:0}to{opacity:1}}
@keyframes pay-pop{from{opacity:0;transform:scale(.82)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.pay-overlay,.pay-card{animation:none}}

/* ── Phone / installed-app layout ─────────────────────────────────────────────────────────────
   Desktop is unchanged: the tools wrapper is layout-transparent, the ⋮ button and tab icons hidden. */
#desk-tools{display:contents}
#desk-more,.dash-tab-icon{display:none}
@media (max-width:760px){
  body{font-size:15px;-webkit-tap-highlight-color:transparent}
  :root{--desk-bottom-inset:env(safe-area-inset-bottom,0px);--desk-safe-top:env(safe-area-inset-top,0px);--desk-keyboard-top-gap:0px}
  :root.desk-keyboard-open{--desk-bottom-inset:0px}
  :root.desk-keyboard-resized{--desk-keyboard-top-gap:var(--desk-safe-top)}
  /* A focused textarea may scroll the document. Anchor to the viewport, not that document. */
  #desk-panel{position:fixed;left:0;top:var(--desk-visible-top,0px);width:100%;height:100vh;height:calc(var(--desk-visible-height,100dvh) + var(--desk-keyboard-top-gap,0px))}
  .auth-shell{min-height:100dvh;padding:calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom))}
  /* iOS zooms into any field under 16px; keep every input at 16px. */
  input,select,textarea,#desk-search,.composer textarea,.bm3-composer textarea,#msg-text,.stage-select{font-size:16px!important}

  /* App bar */
  #desk-head{position:relative;z-index:25;flex-wrap:wrap;gap:6px 6px;min-height:0;padding:calc(8px + env(safe-area-inset-top)) 10px 8px calc(12px + env(safe-area-inset-left))}
  #desk-head .brand{margin-right:auto;gap:9px}
  #desk-head .brand-mark{width:30px;height:30px;border-radius:9px;font-size:16px}
  #desk-head .brand-name{font-size:16.5px}
  #desk-head #desk-search{order:5;flex:1 1 100%;width:100%;max-width:none;margin:2px 0 0;padding-top:11px;padding-bottom:11px;border-radius:12px}
  #desk-panel.has-detail #desk-search{display:none}
  #desk-head #msg-toggle{padding:8px 11px;font-size:13px}
  #desk-more{display:grid;place-items:center;width:40px;height:40px;padding:0;font-size:22px;line-height:1;border-radius:10px}
  #desk-tools{display:none}

  /* Content area: list, and full-screen detail / Contact Chef layered over it */
  #desk-body-shell{position:relative}
  #workspace,#workspace.detail-open,#desk-body-shell.chat-open #workspace.detail-open{display:block;height:100%;padding:0;gap:0}
  #table-col{height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;container-type:normal;padding:10px 12px calc(84px + env(safe-area-inset-bottom))}
  #detail-resize{display:none!important}
  #detail-pane{position:absolute;inset:0;z-index:20;height:auto;border:0;border-radius:0;background:#080808}
  #msg-sidebar{position:absolute;inset:0;z-index:30;width:auto;border:0!important;transform:translateX(100%);transition:transform .22s ease,visibility .22s}
  #desk-body-shell.chat-open #msg-sidebar{flex-basis:auto;transform:none}
  @media(prefers-reduced-motion:reduce){#msg-sidebar{transition:none}}

  /* Bottom tab bar (the same three desk tabs) */
  .dash-tabs{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:15;display:flex;border:0;border-top:1px solid #262626;border-radius:0;background:rgba(9,9,9,.97);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
  #desk-panel.has-detail .dash-tabs{display:none}
  .dash-tab{position:relative;flex-direction:column;gap:3px;padding:8px 4px 7px;border:0;font-size:11.5px;font-weight:700;color:#8d8d8d;box-shadow:none;background:transparent!important}
  .dash-tab-icon{display:block;position:relative;line-height:0}
  .dash-tab-icon svg{width:24px;height:24px}
  .dash-tab-full{display:none}.dash-tab-short{display:inline}
  .dash-tab.active{color:#ef7d22;box-shadow:none}
  .dash-tab-count{position:absolute;top:3px;left:calc(50% + 7px);min-width:18px;padding:1px 5px;font-size:10px;line-height:1.4}
  .dash-tab.blink{animation:none;color:#ffb878}
  .dash-tab.blink::before{position:absolute;top:6px;left:calc(50% - 20px);width:8px;height:8px}
  .dash-tab:hover{background:transparent}

  /* Request rows become tap cards */
  .req-table,.req-table tbody{display:block;width:100%;border:0;background:transparent;border-radius:0;table-layout:auto}
  .req-table thead{display:none}
  .req-table tr[data-key]{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"cust age" "needs needs";gap:5px 12px;margin:0 0 9px;padding:14px 15px;border:1px solid #2a2a2a;border-radius:14px;background:#121212}
  .req-table tr[data-key]:active{background:#1d1814}
  .req-table td,.req-table th{padding:0;border:0;width:auto!important;background:transparent!important}
  .req-table td.manual-order{grid-column:1/-1;width:auto}
  .req-table .customer-td{grid-area:cust;font-size:15.5px;font-weight:700;color:#f2f2f2}
  .req-table td.needs-td{grid-area:needs;color:#b9b9b9;font-size:13.5px}
  .req-table .age-col{grid-area:age;display:block!important;color:#8a8a8a;font-size:12px;text-align:right}
  .req-table tr.reply-pulse{border-color:#7b481f;background:#1c140d}
  .req-table tr.reply-pulse td:first-child{box-shadow:none}
  .req-table tr.dash-empty,.req-table tr.dash-empty td{display:block}
  .req-table .dash-empty td{padding:40px 10px}
  .lockbadge{max-width:96px}

  /* Request detail, full screen */
  .bm3-detail-head{gap:8px;padding:8px 14px 12px}
  .bm3-detail-head>div:first-child{order:2;flex:1 1 100%;min-width:0}
  .bm3-detail-head h3{font-size:18.5px}
  .bm3-job-actions{order:1;flex:1 1 100%;justify-content:flex-start;gap:8px}
  .detail-closebox{order:-1;margin-right:auto}
  #detail-close{border:0;background:transparent;padding:8px 10px 8px 2px;font-size:0;color:#ffad67}
  #detail-close::before{content:"‹ Back";font-size:16px;font-weight:700}
  .stage-toggle{margin:0}
  .stage-note{text-align:left;max-width:none}
  .settled-label,.taken-banner,.fwd-banner{margin:10px 14px 0}
  .thread-flat{padding:12px 14px}
  .bm3-history{padding:6px 9px}
  .bm3-composer{max-height:62%;padding:10px 12px calc(10px + var(--desk-bottom-inset,0px))}
  .bm3-engine{max-height:26vh}
  .bm3-reply-row{gap:8px}
  .bm3-reply-row #queueBtn{width:48px;height:48px;border-radius:50%}

  /* Chat composers: one-line pill that grows (JS caps it at ~6 lines), round buttons on its bottom edge. */
  .bm3-reply-row,.msg-compose{align-items:flex-end;gap:8px}
  .msg-compose{margin-top:10px}
  #draft,#msg-text{display:block;height:46px;min-height:46px!important;max-height:150px;margin:0;padding:11px 17px;border:1px solid #3a3a3a;border-radius:23px;line-height:22px;resize:none!important;overflow-y:hidden;background:#151515}
  #draft:focus,#msg-text:focus{border-color:#5a5a5a}
  #msg-text.has-content{border-color:#7b481f}
  .bm3-reply-row #queueBtn,.msg-icon-btn{flex:none;width:46px;height:46px;border-radius:50%}
  #capture-ui{background:transparent;border-color:#3a3a3a}
  /* Contact Chef, full screen */
  /* The app bar already clears the screen cutout; this nested chat must not add it again. */
  .msg-card{padding:12px 12px calc(10px + var(--desk-bottom-inset,0px))}
  .msg-head{margin:-12px -12px 0;padding:12px 14px}
  #msg-close{width:40px;height:40px;padding:0;border-radius:50%}
  #msg-text{min-height:48px;max-height:30vh}
  .msg-icon-btn{width:46px;height:46px;border-radius:50%}
  .msg-bubble{max-width:86%}
  .pay-card .pay-name{font-size:28px}.pay-card .pay-amount{font-size:44px}
}
/* Installed app: the browser bar is gone, so give the status bar the app colour. */
@media (display-mode:standalone){html{background:#050505}}

/* iOS-style action sheet (phone ⋮ menu) */
#action-sheet,[class~="as-closing"]{position:fixed;inset:0;z-index:60}
.as-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55);opacity:0;transition:opacity .25s ease}
.as-panel{position:absolute;left:0;right:0;bottom:0;display:grid;gap:8px;padding:0 8px calc(8px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .3s cubic-bezier(.2,.9,.25,1)}
.open>.as-backdrop{opacity:1}.open>.as-panel{transform:none}
.as-group{overflow:hidden;border-radius:14px;background:rgba(38,38,40,.86);backdrop-filter:saturate(180%) blur(22px);-webkit-backdrop-filter:saturate(180%) blur(22px)}
.as-title{padding:13px 16px 11px;color:#8e8e93;font-size:13px;font-weight:600;text-align:center;border-bottom:.5px solid rgba(255,255,255,.12)}
.as-row{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:57px;margin:0;padding:0 48px;border:0;border-radius:0;background:transparent;color:#f58220;font-size:19px;font-weight:400;letter-spacing:-.01em}
.as-row+.as-row{border-top:.5px solid rgba(255,255,255,.12)}
.as-row:hover{background:transparent}
.as-row:active{background:rgba(255,255,255,.1)}
.as-check{position:absolute;right:18px;font-size:18px;font-weight:600}
.as-row[aria-checked="true"]{color:#fff;font-weight:600}
.as-row[aria-checked="true"] .as-check{color:#f58220}
.as-destructive{color:#ff453a}
.as-cancel{background:rgba(44,44,46,.96)}
.as-cancel .as-row{font-weight:600;color:#f58220}
@media(prefers-reduced-motion:reduce){.as-backdrop,.as-panel{transition:none}}
.as-row:focus{outline:none}.as-row:focus-visible{background:rgba(255,255,255,.08)}
#desk-more:focus:not(:focus-visible){outline:none}

/* Folded payment-details reply: styled as a system event (dashed, muted, italic) plus a show toggle. */
.bm3-payment-summary{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bm3-payment-toggle{flex:none;padding:0 3px;border:0;background:transparent;color:#b7c2cf;font-size:11px;font-style:normal;font-weight:600}
.bm3-payment-toggle:hover{background:transparent;color:#ffad67;text-decoration:underline}
.bm3-history-payment .bm3-payment-summary+.bm3-history-message{font-style:normal;border-top:1px dashed #3a3a3a;padding-top:8px}

/* ── Owner (Chef) mode ── */
.owner-copy{margin-left:6px;padding:1px 8px;border:1px solid #6b4320;border-radius:6px;background:#24170c;color:#ffbd86;font-size:11px;font-weight:700;vertical-align:1px}
.owner-release{margin:12px 26px 0;padding:12px 14px;border:1px solid #2f4a36;border-left:3px solid #4caf6e;border-radius:10px;background:#101a13}
.owner-rel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.owner-rel-head strong{color:#bfe8c9;font-size:14px}
.owner-rel-state{color:#9fd8ad;font-size:12px;font-weight:650}
.owner-rel-state.attention{color:#ffb878}.owner-rel-state.released{color:#6ee7a0}
.owner-rel-feature{margin:2px 0;color:#f0f0f0;font-weight:700}
.owner-rel-cal{margin:0 0 6px;color:#cfd8d2;font-size:13px}
.owner-rel-list{margin:3px 0;color:#b9c4bd;font-size:12.5px;overflow-wrap:anywhere}.owner-rel-list b{color:#e0e8e2;font-weight:650}
.owner-release #ownerApprove{margin-top:10px;width:100%;padding:11px}
/* Fresh-code alert (iOS style) */
#code-alert{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:24px}
.ca-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55);opacity:0;transition:opacity .2s}
.ca-box{position:relative;width:min(300px,100%);overflow:hidden;border-radius:14px;background:rgba(40,40,42,.96);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);text-align:center;transform:scale(1.08);opacity:0;transition:transform .2s,opacity .2s}
#code-alert.open .ca-backdrop{opacity:1}#code-alert.open .ca-box{transform:none;opacity:1}
.ca-box h3{margin:18px 16px 4px;font-size:17px;font-weight:650;color:#f2f2f2}
.ca-box p{margin:0 16px 12px;color:#c9c9cc;font-size:13px;line-height:1.35}
.ca-box input{display:block;width:calc(100% - 32px);margin:0 16px 16px;padding:10px;border:1px solid #4a4a4e;border-radius:9px;background:#1c1c1e;color:#fff;font-size:22px!important;letter-spacing:.3em;text-align:center}
.ca-box input:focus{outline:none;border-color:#f58220}
.ca-actions{display:grid;grid-template-columns:1fr 1fr;border-top:.5px solid rgba(255,255,255,.14)}
.ca-actions button{margin:0;padding:13px 6px;border:0;border-radius:0;background:transparent;color:#f58220;font-size:17px;font-weight:400}
.ca-actions button+button{border-left:.5px solid rgba(255,255,255,.14)}
.ca-actions .ca-primary{font-weight:650}.ca-actions button:disabled{color:#6b6b6b}
.ca-actions button:hover{background:transparent}.ca-actions button:active{background:rgba(255,255,255,.08)}
@media (max-width:760px){.owner-release{margin:10px 14px 0}}
/* The suggestion card is guidance written for staff ("use Contact Chef…"); Chef does not need it.
   Its draft prefill still lands in the reply box. */
.owner-mode #assistCard:not(.scope-guidance){display:none}
.owner-rel-head{flex-wrap:wrap}
.owner-rel-head strong{white-space:nowrap}
.owner-rel-state{text-align:right;margin-left:auto}

/* Company-voice prompt: shown instead of sending a reply written as "I/my/me". */
.voice-check{margin-top:8px;padding:10px 12px;border:1px solid rgba(255,138,61,.45);border-radius:10px;background:rgba(255,138,61,.08);color:var(--text,#eee);font-size:13px;line-height:1.4}
.voice-check p{margin:0 0 6px}
.voice-check .voice-words{display:flex;flex-wrap:wrap;gap:6px}
.voice-check .voice-words span{padding:2px 8px;border-radius:999px;background:rgba(255,138,61,.18);font-size:12px}
.voice-check .voice-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}

/* Payment amount confirm (reuses the code dialog). */
.build-scope-overlay{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:16px}
.build-scope-backdrop{position:absolute;inset:0;background:#000b}
.build-scope-card{position:relative;width:min(600px,100%);max-height:min(80vh,760px);overflow:auto;background:#151515;color:#f2f2f2;border:1px solid #664225;border-radius:14px;box-shadow:0 24px 70px #000b;padding:22px}
.build-scope-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.build-scope-card h2{margin:3px 0 14px;font-size:20px}.build-scope-card h3{font-size:12px;color:#f58b2a;text-transform:uppercase;letter-spacing:.08em;margin:18px 0 8px}
.build-scope-card header button{border:0;background:#292929;color:#eee;border-radius:7px;padding:5px 9px;cursor:pointer}
.build-scope-summary{font-size:15px;line-height:1.5;margin:8px 0 14px}
.build-scope-choices{display:grid;gap:7px}.build-scope-choices>div{display:flex;justify-content:space-between;gap:16px;padding:9px 11px;border:1px solid #333;border-radius:7px;background:#1d1d1d}
.build-scope-choices span{color:#aaa}.build-scope-choices strong{text-align:right;font-weight:600}
.build-scope-card ul{margin:0;padding-left:18px;line-height:1.5}.build-scope-card li+li{margin-top:5px}
.build-scope-foot{color:#9b9b9b;font-size:12px;margin:18px 0 0}
.price-alert .pa-field{display:flex;align-items:center;justify-content:center;gap:4px;margin:0 16px 12px;padding:0 12px;border:1px solid #4a4a4e;border-radius:9px;background:#1c1c1e}
.price-alert .pa-field span{color:#c9c9cc;font-size:22px}
.price-alert .pa-field input{margin:0;padding:10px 0;width:5ch;border:0;background:transparent;letter-spacing:0;text-align:left}
.price-alert .pa-fixed{font-size:26px!important;font-weight:650;color:#fff!important}
.price-alert .pa-source{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.price-alert .pa-note{color:#ffbd86!important}
/* Cupertino alert on phones: sit in the upper part of the screen like iOS does, so the number
   keyboard never covers the buttons (applies to the code prompt too). */
@media (max-width:760px){#code-alert{place-items:start center;padding-top:max(12vh,calc(env(safe-area-inset-top) + 24px))}}
.agreed-price{color:#c9c9cc}.agreed-price.below{color:#ffbd86}

/* Team chat: group view with folded request threads; a thread opens in place with ‹ Team back. */
.chat-head-main{min-width:0}
.chat-back{display:inline-block;margin:0 0 4px -4px;padding:2px 6px;border:0;background:transparent;color:#ffad67;font-size:14px;font-weight:600;cursor:pointer}
.chat-back[hidden]{display:none}
.chat-back:hover{color:#fff;background:transparent}
.chat-thread-card{display:flex;align-items:center;gap:8px;width:100%;margin:2px 0;padding:6px 10px;min-height:0;text-align:left;
  border:1px solid #2c241c;border-left:2px solid #6a401d;border-radius:8px;background:#15120f;color:#d8d8d8;font-size:12.5px;line-height:1.3;cursor:pointer}
.chat-thread-card:hover{border-color:#F26A21}
.chat-thread-card.has-unread{border-left-color:#F26A21;background:#1c150e}
.ct-title{flex:0 0 auto;max-width:40%;font-weight:700;color:#ffad67;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ct-last{flex:1 1 auto;min-width:0;color:#a9a9a9;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-thread-card.has-unread .ct-last{color:#e8e8e8}
.ct-time{flex:none;font-size:10.5px;color:#8a8a8a}
.ct-unread{flex:none;min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:#F26A21;color:#fff;font-size:10.5px;font-weight:700;line-height:17px;text-align:center}

/* @mentions */
.msg-text .mention{color:#ffad67;font-weight:700}
.msg-text .mention.me{background:rgba(242,106,33,.22);border-radius:4px;padding:0 3px;color:#fff}
.mention-strip{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}
.mention-strip[hidden]{display:none}
.mention-pick{padding:4px 10px;border-radius:999px;border:1px solid #6a401d;background:#1c150e;color:#ffad67;font-size:12.5px;cursor:pointer}
.mention-pick:hover{border-color:#F26A21;color:#fff}
.chat-badge.mentioned,.ct-unread.mentioned{background:#e0442c}

/* Request threads in the group view: their own fixed, searchable scroll area (latest at the bottom). */
.chat-threads{flex:none;margin:10px 0 0;border:1px solid #2c241c;border-radius:10px;background:rgba(11,12,14,.72)}
.chat-threads[hidden]{display:none}
.chat-threads summary{min-height:44px;display:flex;align-items:center;gap:6px;padding:8px 10px;list-style:none;cursor:pointer;font-size:12.5px;font-weight:650;color:#dedede}
.chat-threads summary::-webkit-details-marker{display:none}
.chat-threads summary::after{content:'›';margin-left:auto;font-size:20px;line-height:1;color:#aaa}
.chat-threads[open] summary::after{transform:rotate(90deg)}
.chat-threads summary:focus-visible{outline:2px solid #ef7d22;outline-offset:-2px;border-radius:9px}
#chat-thread-count{font-weight:400;color:#999}
.chat-threads-body{display:flex;flex-direction:column;gap:6px;padding:0 8px 8px}
.chat-threads:not([open]) .chat-threads-body{display:none}
#chat-thread-search{width:100%;padding:6px 10px;border-radius:8px;border:1px solid #2f2f2f;background:#101012;color:#e8e8e8;font-size:12.5px}
#chat-thread-search:focus{outline:none;border-color:#F26A21}
.chat-thread-list{max-height:170px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4a4a4a transparent}
.chat-thread-none{margin:6px 2px;font-size:12px}
@media (max-width:760px){.chat-thread-list{max-height:140px}}

/* Issue note alert (same iOS alert as the price/code alerts) */
.issue-alert #issue-note{width:100%;box-sizing:border-box;margin:10px 0 2px;padding:10px 12px;border-radius:10px;border:1px solid #3a3a3a;background:#0f0f10;color:#eee;font:inherit;font-size:15px;resize:vertical;min-height:72px}
.issue-alert #issue-note:focus{outline:none;border-color:#F26A21}

/* Keep readiness actionable without repeating the entire scope in the conversation. */
.scope-questions{margin:6px 0;padding-left:18px;font-size:13px;line-height:1.5}
.scope-questions li+li{margin-top:6px}

@media (min-width:761px) and (max-width:1100px){
  #workspace.detail-open{grid-template-rows:minmax(100px,1fr) 14px minmax(360px,var(--detail-height,65vh))}
  .bm3-composer{max-height:45%}
}

/* Mobile prioritizes conversation and the next action; secondary details expand on demand. */
.vehicle-toggle,.scope-short{display:none}
@media (max-width:760px){
  #desk-head{gap:6px;min-height:56px;padding:calc(4px + env(safe-area-inset-top)) 10px 4px}
  #desk-head #enable-sound{display:none}
  #desk-head .brand{gap:7px}
  #desk-head .brand-mark{width:26px;height:26px}
  #desk-head .brand-name{font-size:15px}
  #desk-head #msg-toggle{min-height:44px;padding:8px 10px;border-color:transparent;background:transparent}
  #desk-more{width:44px;height:44px;border-color:transparent;background:transparent}
  #desk-head #desk-search{margin:0 0 4px;padding:9px 12px;border-radius:8px}
  .bm3-detail-head{gap:4px;padding:2px 12px 8px}
  .bm3-detail-head .bm3-eyebrow{display:none}
  .bm3-detail-head h3{font-size:17px;line-height:1.3;margin-top:2px}
  .bm3-detail-subtitle{margin:3px 0 0;font-size:12px}
  .bm3-job-actions{gap:6px;align-items:center}
  .bm3-job-actions .stage-toggle{flex:1;min-width:0}
  .bm3-job-actions .stage-label{font-size:0;gap:0;width:100%}
  .bm3-job-actions .stage-select{width:100%;min-width:0;max-width:100%;min-height:44px;padding:8px 6px;border-color:transparent;background-color:transparent;font-size:16px!important}
  .detail-closebox{margin-right:0;flex:none}
  #detail-close{min-width:44px;min-height:44px;padding:8px 4px}
  #detail-close::before{font-size:14px}
  #build-scope-btn{min-height:44px;padding:8px 10px;border-color:transparent;background:transparent;color:#ffb16b}
  .scope-long{display:none}.scope-short{display:inline}
  .vehicle-toggle{display:inline-flex;align-items:center;gap:6px;padding:6px 0;min-height:36px;border:0;background:transparent;color:#a8a8a8;font-size:12px}
  .bm3-detail-car{display:none;margin:0 0 5px;font-size:12px}
  .vehicle-open .bm3-detail-car{display:block}
  .vehicle-open .vehicle-toggle span{transform:rotate(180deg)}
  .req-table tr[data-key]{padding:11px 12px;margin-bottom:6px;gap:3px 10px;border-radius:9px}
  .req-table .customer-td{font-size:14px}
  .req-table td.needs-td{font-size:12.5px}
  .thread-flat{padding:8px 10px;gap:5px}
  .bm3-history{padding:6px 9px;border-radius:9px}
  .bm3-composer{padding:8px 10px calc(8px + var(--desk-bottom-inset,0px))}
  .bm3-engine{padding:8px 10px;margin-bottom:8px;border:0;border-left:2px solid #ef7d22;border-radius:0;background:transparent}
  .bm3-engine h3{font-size:12px;margin-bottom:4px}
  .bm3-engine-card p{margin:4px 0;font-size:12px;line-height:1.4}
  .scope-questions{margin:4px 0;font-size:13px}
  .build-scope-card{padding:16px;border-radius:12px;max-height:85dvh}
  .build-scope-choices{gap:0}
  .build-scope-choices>div{padding:10px 0;border:0;border-bottom:1px solid #303030;background:transparent;border-radius:0}
  .build-scope-card header button{min-width:44px;min-height:44px}
}
.as-sort summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 18px;cursor:pointer;color:#eee;font-size:16px;list-style:none}
.as-sort summary::-webkit-details-marker{display:none}
.as-sort summary::after{content:'⌄';color:#999}
.as-sort[open] summary::after{content:'⌃'}
@media (max-width:760px){.as-row{min-height:48px;font-size:16px}.as-sort[open] summary{border-bottom:1px solid #3a3a3a}}
.scope-identity{margin-top:16px;font-size:12px}
.scope-identity summary{cursor:pointer;padding:8px 0;color:#bbb}
.scope-identity strong{overflow-wrap:anywhere;min-width:0}
.scope-approval-record{font-size:13px;line-height:1.5;color:#c9dec9;margin:16px 0}
#approve-scope-btn{margin-top:16px;width:100%;min-height:44px}
#scope-approval-feedback:empty{display:none}
#scope-approval-feedback{font-size:13px;color:#ffb36d}

/* Scope review uses an iOS sheet on phones, with independent scrolling and a safe-area footer. */
.scope-sheet-grabber{display:none}
.build-scope-card:focus{outline:none}
@media (max-width:760px){
  .build-scope-overlay{padding:0;place-items:end center}
  .build-scope-backdrop{background:rgba(0,0,0,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
  .build-scope-card{display:flex;flex-direction:column;width:100%;max-height:calc(100dvh - max(20px,env(safe-area-inset-top)));padding:0;overflow:hidden;border:0;border-radius:26px 26px 0 0;background:#1c1c1e;box-shadow:0 -8px 48px #0005;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;animation:scope-sheet-in .24s ease-out;transition:transform .2s ease-out}
  .scope-sheet-grabber{display:flex;flex:none;justify-content:center;height:22px;align-items:center;touch-action:none}
  .scope-sheet-grabber span{width:36px;height:5px;border-radius:3px;background:#636366}
  .build-scope-card header{position:relative;flex:none;min-height:48px;align-items:center;justify-content:center;padding:0 56px 8px;touch-action:none}
  .build-scope-card header .bm3-eyebrow{display:none}
  .build-scope-card h2{margin:0;font-size:17px;font-weight:600;letter-spacing:-.3px;text-align:center}
  .build-scope-card header button{position:absolute;right:10px;top:-3px;min-width:44px;min-height:44px;padding:0;border-radius:50%;background:transparent;color:#b5b5ba;font-size:16px}
  .build-scope-card header button::before{content:'';position:absolute;inset:7px;background:#343436;border-radius:50%;z-index:-1}
  .scope-sheet-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 16px 20px}
  .build-scope-summary{margin:0 4px 20px;color:#aeaeb2;font-size:15px;line-height:1.4;text-align:center}
  .build-scope-card h3{margin:20px 16px 7px;color:#98989f;font-size:12px;letter-spacing:.03em;font-weight:500}
  .build-scope-choices{gap:0;border-radius:12px;overflow:hidden;background:#2c2c2e}
  .build-scope-choices>div{position:relative;gap:16px;align-items:center;min-height:46px;padding:11px 16px;border:0;background:transparent;font-size:15px;line-height:1.35}
  .build-scope-choices>div+div::before{content:'';position:absolute;top:0;left:16px;right:0;height:1px;background:#444446}
  .build-scope-choices span{color:#f2f2f7;min-width:0}
  .build-scope-choices strong{color:#aeaeb2;font-weight:400;min-width:0;overflow-wrap:anywhere}
  .scope-identity{margin-top:16px;font-size:13px}
  .scope-identity summary{min-height:44px;padding:12px 16px;color:#aeaeb2}
  .scope-approval-record{margin:16px 4px 0;color:#a8d5b5;font-size:13px}
  .scope-sheet-footer{flex:none;padding:12px 16px calc(14px + env(safe-area-inset-bottom));border-top:1px solid #38383a;background:#1c1c1e}
  #approve-scope-btn{margin:0;min-height:50px;border:0;border-radius:13px;background:#f5822b;color:#111;font-size:17px;font-weight:600;box-shadow:none}
  .scope-sheet-footer .build-scope-foot{margin:9px 8px 0;color:#98989f;font-size:12px;line-height:1.4;text-align:center}
  .scope-sheet-footer .build-scope-foot:first-child{margin-top:0}
  #scope-approval-feedback{margin:8px 4px 0}
  .build-scope-card.scope-dragging{transition:none;animation:none}
}
@keyframes scope-sheet-in{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){.build-scope-card{animation:none;transition:none}}

/* A focused sign-in surface, with room for a phone keyboard and first-time setup. */
.auth-shell{position:fixed;inset:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:32px 24px;background:radial-gradient(ellipse at 50% 0,rgba(239,125,34,.055),transparent 60%),#0c0c0e}
.auth-card{width:min(400px,100%);margin:auto;padding:32px;gap:0;background:#1c1c1e;border:1px solid #303032;border-radius:24px;box-shadow:0 24px 80px #0003}
.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:32px;color:#d1d1d6;font-size:15px;font-weight:600;letter-spacing:-.2px}
.auth-card .brand-mark{width:36px;height:36px;border-radius:10px}
.auth-card h1{font-size:28px;line-height:1.2;letter-spacing:-.7px;font-weight:650;margin-bottom:8px}
.auth-card #auth-intro{font-size:15px;line-height:1.5;color:#98989f;margin-bottom:28px}
.auth-card label{font-size:13px;color:#c7c7cc;font-weight:500;margin-bottom:8px}
.auth-card input{width:100%;min-width:0;min-height:52px;padding:13px 15px;border:1px solid #414144;border-radius:12px;background:#242426;font-size:17px;letter-spacing:normal;text-align:left;margin-bottom:20px;transition:border-color .15s,box-shadow .15s}
.auth-card input::placeholder{color:#77777f;opacity:1}
.auth-card input:focus{outline:none;border-color:#f5822b;box-shadow:0 0 0 3px #f5822b22}
.auth-card #auth-code{font-variant-numeric:tabular-nums;text-align:center;letter-spacing:.35em;font-size:22px;padding-left:calc(15px + .35em)}
.auth-card #auth-submit{min-height:50px;padding:12px;border-radius:12px;border:0;background:#f5822b;color:#111;font-size:16px;font-weight:650;margin-top:4px}
.auth-card #auth-submit:disabled{opacity:.55;cursor:wait}
.auth-card #auth-setup-note{font-size:12px;line-height:1.5;text-align:center;color:#8e8e93;margin-top:22px}
.auth-card #auth-error{margin-top:16px;font-size:13px}
.auth-card #auth-qr,.auth-card #auth-secret{margin-bottom:20px}
@media(max-width:760px){
  .auth-shell{min-height:0;padding:calc(32px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));background:#1c1c1e}
  .auth-card{width:min(380px,100%);border:0;border-radius:0;box-shadow:none;padding:0;background:transparent}
  .auth-brand{margin-bottom:36px}
}
@media(max-height:560px){.auth-card{margin:0 auto}.auth-brand{margin-bottom:20px}.auth-card #auth-intro{margin-bottom:20px}}
@media(prefers-reduced-motion:reduce){.auth-card input{transition:none}}

.push-settings h2{font-size:19px;text-align:center;margin:22px 18px 10px}.push-settings p{font-size:15px;line-height:1.5;color:#bcbcbc;text-align:center;padding:0 22px;margin:8px 0 20px}.push-settings [role=status]:empty{display:none}.push-settings button:disabled{opacity:.5}
.push-required{position:fixed;inset:0;width:min(460px,calc(100% - 16px));max-height:calc(100dvh - 24px);padding:0;border:0;background:transparent;color:inherit;overflow:auto}
.push-required::backdrop{background:#0009;backdrop-filter:blur(5px)}
.push-required .as-panel{position:relative;padding:0;transform:none;transition:none}
@media(max-width:760px){.push-required{inset:auto 0 0;margin:0 auto;padding-bottom:calc(8px + env(safe-area-inset-bottom));max-height:calc(100dvh - 32px)}}
@media(min-width:761px){#action-sheet .as-panel{max-width:460px;margin:auto}}
@media(max-width:760px){#phone-notifications{display:none}}
