:root{color-scheme:dark;--bg:#14141b;--panel:#1e1e28;--panel2:#252532;--line:#343440;--fg:#f1f1f5;--muted:#a8a8b9;--accent:#aa67dc;--purple:#962fbf;--blue:#4f5bd5;--pink:#d62976;--orange:#fa7e1e;font-family:Montserrat,Inter,system-ui,sans-serif;background:var(--bg);color:var(--fg)}*{box-sizing:border-box}body{margin:0;min-height:100vh;font-size:14px}button,input,textarea,select{font:inherit;color:inherit}a{color:#c88ff0;text-decoration:none}a:hover{text-decoration:underline}button{border:1px solid var(--line);background:var(--panel2);border-radius:7px;padding:9px 14px;cursor:pointer;font-weight:600}button:hover{border-color:var(--accent)}button.primary{background:#8334aa;border-color:#a251ca;color:white}button.ghost{background:transparent}button:disabled{opacity:.5;cursor:not-allowed}input,textarea,select{background:#171720;border:1px solid var(--line);border-radius:7px;padding:10px 12px;min-width:0;width:100%;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--accent)}textarea{resize:vertical;min-height:100px}label{display:block;margin:10px 0 5px;font-size:12px;color:var(--muted);font-weight:700}h1,h2,h3,p{margin:0}h1{font-size:28px;letter-spacing:-.7px}h2{font-size:20px}h3{font-size:15px}p{line-height:1.6}.muted,small{color:var(--muted)}small{font-size:12px}.header{height:65px;background:#1a1a23;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:16px}.brand{font-size:18px;letter-spacing:.3px;font-weight:900;color:var(--fg)}.brand b{color:#c288e9}.stripe{height:4px;background:linear-gradient(90deg,var(--orange),var(--pink),var(--purple),var(--blue))}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.stack{display:grid;gap:12px}.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:17px;min-width:0}.error{color:#ffb0b5;white-space:pre-wrap}.success{color:#9fd8ab}.notice{padding:10px 13px;border-radius:6px;background:#2c2537;color:#e2c5f5;font-size:12px}.badge{font-size:11px;padding:4px 8px;border:1px solid #66547e;color:#d7b1ee;background:#33293e;border-radius:100px;white-space:nowrap}.badge.closed{color:#a0d5af;border-color:#4c765a;background:#20372a}.badge.pending{color:#f3cb8c;border-color:#806036;background:#3e3021}.login{max-width:430px;margin:80px auto;padding:24px}.workspace{display:grid;grid-template-columns:210px minmax(240px,300px) minmax(350px,1fr) minmax(270px,340px);min-height:calc(100vh - 69px)}.sidebar,.queue,.customer{background:var(--panel);border-right:1px solid var(--line);padding:16px;min-width:0}.sidebar{background:#191923}.queue{padding:12px}.customer{border-right:0;border-left:1px solid var(--line)}.main{padding:20px;min-width:0}.nav-btn{width:100%;text-align:left;margin:3px 0;background:transparent;border-color:transparent;color:var(--muted)}.nav-btn.selected{background:#35253e;color:#e4c1f7}.section-label{font-size:11px;letter-spacing:1.3px;color:var(--muted);font-weight:bold;margin:20px 0 8px}.ticket{display:block;width:100%;text-align:left;padding:12px 10px;border-radius:7px;margin:6px 0;border:1px solid var(--line);background:#22222d}.ticket.selected{border-color:#a05bd2;background:#34273f}.ticket p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-weight:700}.ticket small{overflow:hidden;text-overflow:ellipsis;display:block}.messages{display:grid;gap:12px;margin:18px 0}.message{padding:15px;background:var(--panel);border:1px solid var(--line);border-radius:9px;white-space:pre-wrap;overflow-wrap:anywhere}.message.note{background:#352b22;border-color:#64523b}.message.draft{background:#28263a;border-color:#504266}.message p{margin-top:10px}.order{border-top:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}.kv{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.kv strong{display:block;margin-top:4px}.admin{max-width:1050px;padding:24px;margin:auto}.admin-grid{display:grid;grid-template-columns:260px 1fr;gap:16px}.hidden,[hidden]{display:none!important}.hero{text-align:center;padding:64px 20px 44px;background:radial-gradient(ellipse at top,#32233e 0,#1c1c29 60%,#14141b 100%)}.hero h1{font-size:40px;margin-bottom:10px}.hero p{color:var(--muted);margin-bottom:22px}.hero input{max-width:650px;background:#242433;font-size:16px;padding:16px}.help-wrap{max-width:1060px;margin:0 auto;padding:22px}.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 30px}.category-grid .card{text-align:left;display:grid;gap:8px;cursor:pointer}.category-grid .card:hover{border-color:var(--accent)}.help-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}.article-row{display:block;width:100%;text-align:left;background:var(--panel);padding:15px;margin:8px 0}.article-body{white-space:pre-wrap;line-height:1.75;overflow-wrap:anywhere;margin:18px 0}.panel{max-width:740px;margin:24px auto}.footer{text-align:center;padding:35px 20px;color:var(--muted);font-size:12px}.bubble{white-space:pre-wrap;overflow-wrap:anywhere;background:#30253d;border-radius:10px;padding:14px;line-height:1.6;margin:12px 0}.full{width:100%}hr{border:0;border-top:1px solid var(--line);margin:16px 0}pre{white-space:pre-wrap;overflow-wrap:anywhere}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(max-width:1200px){.workspace{grid-template-columns:155px 225px minmax(300px,1fr)}.customer{grid-column:3;border-top:1px solid var(--line)}.sidebar{grid-row:1/span 2}.queue{grid-row:1/span 2}}@media(max-width:800px){.workspace{display:block}.sidebar{display:flex;overflow-x:auto;gap:4px;align-items:center;padding:8px}.sidebar .section-label{display:none}.nav-btn{width:auto;white-space:nowrap}.queue{max-height:250px;overflow-y:auto}.customer{border-left:0}.category-grid{grid-template-columns:1fr 1fr}.admin-grid,.help-actions{grid-template-columns:1fr}.header{padding:0 12px}.hero h1{font-size:30px}.main{padding:14px}}
input[type=checkbox]{width:auto;accent-color:var(--purple)}

.reply-default{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.reply-default label,.reply-default small{font-size:.75rem}.reply-default select{width:auto;min-width:110px}.login pre{padding:1rem;background:var(--panel);border:1px solid #555;border-radius:.5rem;font-size:1.1rem;line-height:1.8;white-space:pre-wrap;user-select:all}.login #mfa-back{margin-top:.6rem}.login [hidden]{display:none!important}.login #mfa-secret{font-family:monospace;letter-spacing:.05em}.login #recovery-label{margin:.7rem 0}

.message.reply{border-left:3px solid #962fbf}.message.reply p{white-space:pre-wrap}#send-actions{flex-wrap:wrap}#ticket-attachments .card{margin:8px 0}#email-activity{margin:8px 0}

/* PortalDesk staff workspace v0.8 — scoped so the public Help Center is unchanged. */
body.staff-ui{
 color-scheme:light;
 --bg:#f4f3f5;--panel:#fff;--panel2:#f6f5f7;--line:#e2dfe5;--fg:#27252c;--muted:#716d79;--accent:#8542b2;
 --nav:#eeecef;--canvas:#f4f3f5;--input:#fff;--selected:#e5dceb;--link:#77429e;
 --reply:#edf3fa;--reply-border:#dce7f3;--note:#fffaea;--note-border:#e9dfb6;--draft:#f4eefb;--draft-border:#e3d6ef;
 --avatar:#e8e2ee;--avatar-fg:#6a4384;--notice:#eee7f6;--notice-fg:#653b85;--error:#a52e45;--success:#267049;
 --green:#e8f4eb;--green-fg:#2e6b46;--amber:#fff0d7;--amber-fg:#895b1c;--neutral:#f0eef2;--neutral-fg:#64606a;
 font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
 background:var(--bg);color:var(--fg);font-size:13px;display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden;
}
body.staff-ui[data-theme="dark"]{
 color-scheme:dark;--bg:#17171d;--panel:#21212a;--panel2:#292933;--line:#383840;--fg:#edecf1;--muted:#a6a2af;--accent:#b58bd7;
 --nav:#1d1d25;--canvas:#18181f;--input:#1b1b23;--selected:#382b47;--link:#c5a1e1;
 --reply:#253042;--reply-border:#38465c;--note:#382f20;--note-border:#605039;--draft:#31273d;--draft-border:#51405e;
 --avatar:#3b3047;--avatar-fg:#d1b4eb;--notice:#382b45;--notice-fg:#ddc1ef;--error:#ffabb4;--success:#99d6b0;
 --green:#233b2b;--green-fg:#add7b8;--amber:#3c3020;--amber-fg:#eed096;--neutral:#303039;--neutral-fg:#bab6c2;
}
.staff-ui a{color:var(--link)}
.staff-ui button,.staff-ui input,.staff-ui select,.staff-ui textarea{border-radius:6px;line-height:1.35;font-size:13px}
.staff-ui button{font-weight:550;padding:6px 10px;background:var(--panel);border:1px solid var(--line);white-space:nowrap}
.staff-ui button:hover:not(:disabled){border-color:var(--accent);background:var(--panel2)}
.staff-ui button.primary{background:#8144a8;color:#fff;border-color:#8144a8}
.staff-ui button.primary:hover:not(:disabled){background:#713b96}
.staff-ui button.ghost{background:transparent;border-color:transparent;color:var(--muted)}
.staff-ui input,.staff-ui select,.staff-ui textarea{background:var(--input);border-color:var(--line);padding:8px 10px}
.staff-ui input:focus,.staff-ui select:focus,.staff-ui textarea:focus{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 14%,transparent)}
.staff-ui input[type=checkbox]{width:auto;box-shadow:none}
.staff-ui h1{font-size:22px;letter-spacing:-.35px;line-height:1.25;font-weight:650}
.staff-ui h2{font-size:16px;font-weight:650;line-height:1.4}
.staff-ui h3{font-size:13px;font-weight:650;line-height:1.4}
.staff-ui p{line-height:1.55}
.staff-ui label{font-size:12px;letter-spacing:0;font-weight:550;color:var(--muted)}
.staff-ui small{font-size:11px}
.staff-ui .card{border-radius:8px;padding:14px;background:var(--panel);border-color:var(--line)}
.staff-ui .notice{background:var(--notice);color:var(--notice-fg);border:0;padding:8px 10px;border-radius:6px;font-size:12px}
.staff-ui .error{color:var(--error);font-size:12px}
.staff-ui .success{color:var(--success)}
.staff-ui .badge{display:inline-flex;align-items:center;border:0;background:var(--neutral);color:var(--neutral-fg);font-size:11px;padding:3px 7px;border-radius:4px;line-height:1.3;font-weight:550;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.staff-ui .badge.open{background:var(--green);color:var(--green-fg)}
.staff-ui .badge.closed{background:var(--neutral);color:var(--neutral-fg)}
.staff-ui .badge.pending{background:var(--amber);color:var(--amber-fg)}
.staff-ui .header{height:49px;flex:none;padding:0 16px;gap:12px;background:var(--panel);border-bottom:1px solid var(--line)}
.staff-ui .brand{font-size:17px;font-weight:850;letter-spacing:.35px;color:var(--fg)}
.staff-ui .brand b{color:var(--accent)}
.staff-ui .header-actions{flex-wrap:nowrap;gap:12px;min-width:0;font-size:12px}
.staff-ui .header-actions>a{white-space:nowrap;color:var(--muted)}
.staff-ui .header-actions #user-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:165px;font-size:12px}
.staff-ui .staging-label{color:var(--muted);font-size:11px;white-space:nowrap;border-right:1px solid var(--line);padding-right:12px}
.staff-ui .reply-default{gap:6px;flex-wrap:nowrap}
.staff-ui .reply-default label{margin:0;white-space:nowrap;font-size:11px}
.staff-ui .reply-default select{padding:5px 8px;max-width:165px;font-size:12px}
.staff-ui .reply-default small{white-space:nowrap}
.staff-ui .stripe{height:3px;flex:none}
.staff-ui #desk{flex:1;min-height:0;overflow:hidden}
.staff-ui .workspace{display:grid;grid-template-columns:212px minmax(0,1fr) 310px;grid-template-rows:minmax(0,1fr);height:100%;min-height:0;gap:0}
.staff-ui .workspace[data-screen="inbox"],.staff-ui .workspace[data-screen="management"]{grid-template-columns:212px minmax(0,1fr)}
.staff-ui .sidebar{grid-column:1;grid-row:1;min-width:0;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:0;border-right:1px solid var(--line);background:var(--nav);padding:17px 10px 12px}
.staff-ui .sidebar-title{padding:0 6px 15px;display:grid;gap:13px}
.staff-ui .sidebar-title h2{font-size:18px;font-weight:650}
.staff-ui .sidebar-title button{justify-self:start;padding:7px 12px}
.staff-ui .section-label,.staff-ui .nav-group>summary{font-size:11px;font-weight:650;color:var(--muted);letter-spacing:.2px;margin:10px 8px 7px;text-transform:none}
.staff-ui .sidebar nav{display:grid;gap:2px}
.staff-ui .nav-btn{display:flex;align-items:center;gap:8px;text-align:left;background:transparent;color:var(--fg);border:0;width:100%;min-width:0;white-space:normal;margin:0;padding:7px 8px;border-radius:5px;font-size:12.5px}
.staff-ui .nav-btn.selected{background:var(--selected);color:var(--fg);font-weight:650}
.staff-ui .nav-btn:hover:not(:disabled){background:var(--selected)}
.staff-ui .nav-symbol{width:16px;flex:none;text-align:center;font-size:13px;color:var(--muted)}
.staff-ui .nav-count{margin-left:auto;color:var(--muted);font-size:11px;min-width:20px;text-align:right;font-variant-numeric:tabular-nums}
.staff-ui .nav-btn.selected .nav-count{background:#8144a8;color:white;border-radius:4px;padding:2px 4px;text-align:center}
.staff-ui .nav-group{margin-top:24px}
.staff-ui .nav-group summary{cursor:pointer;list-style:disclosure-closed}
.staff-ui .nav-group[open] summary{list-style:disclosure-open}
.staff-ui .nav-group .nav-btn{padding-left:16px}
.staff-ui .sidebar-foot{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:11px;padding:24px 8px 0;margin-top:auto}
.staff-ui .online-dot{width:7px;height:7px;border-radius:50%;background:#5ca87a;flex:none}
.staff-ui .queue{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-height:0;min-width:0;max-height:none;padding:0;background:var(--panel);border:0;overflow:hidden}
.staff-ui .inbox-heading{display:flex;align-items:center;justify-content:space-between;padding:24px 28px 17px;gap:16px;border-bottom:1px solid var(--line)}
.staff-ui .eyebrow{color:var(--muted);font-size:10px;letter-spacing:1px;font-weight:650;margin-bottom:5px}
.staff-ui #queue-count{font-size:12px;margin-top:5px}
.staff-ui .queue-search{padding:14px 28px;flex:none}
.staff-ui .queue-search input{max-width:540px;background:var(--panel2);padding:10px 12px}
.staff-ui .queue-table-header,.staff-ui .queue-ticket{display:grid;grid-template-columns:minmax(0,1fr) 105px minmax(110px,160px) 135px;gap:16px;align-items:center}
.staff-ui .queue-table-header{background:var(--panel2);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 28px;font-size:11px;color:var(--muted);font-weight:650;flex:none}
.staff-ui .ticket-list{overflow:auto;min-height:0;flex:1}
.staff-ui .queue-ticket{width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--panel);padding:15px 28px;text-align:left;white-space:normal;font-weight:400;min-height:68px}
.staff-ui .queue-ticket:hover:not(:disabled),.staff-ui .queue-ticket.selected{background:var(--panel2);border-color:var(--line)}
.staff-ui .queue-person,.staff-ui .queue-copy{display:flex;min-width:0;gap:10px;align-items:center}
.staff-ui .queue-copy{display:grid;gap:5px;flex:1}
.staff-ui .queue-copy strong,.staff-ui .queue-meta,.staff-ui .queue-assignee,.staff-ui .queue-updated{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;min-width:0}
.staff-ui .queue-copy strong{font-weight:650;font-size:13px}
.staff-ui .queue-meta,.staff-ui .queue-updated{color:var(--muted);font-size:11.5px}
.staff-ui .queue-assignee{font-size:12px}
.staff-ui .avatar{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:0 0 30px;background:var(--avatar);color:var(--avatar-fg);font-size:10.5px;font-weight:700;border-radius:50%;letter-spacing:.2px}
.staff-ui .empty-state,.staff-ui .loading-state{padding:48px 24px;text-align:center;color:var(--muted)}
.staff-ui .empty-state h2{color:var(--fg);margin-bottom:8px}
.staff-ui .loading-state p{margin-top:18px}
.staff-ui .main{display:grid;grid-template-rows:auto minmax(0,1fr) auto;grid-column:2;grid-row:1;min-width:0;min-height:0;overflow:hidden;padding:0;background:var(--canvas)}
.staff-ui .conversation-header{background:var(--panel);padding:10px 15px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.staff-ui .conversation-heading{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.staff-ui .back-link{flex:none;font-size:12px;color:var(--muted)}
.staff-ui .conversation-title{min-width:0}
.staff-ui .breadcrumb{color:var(--muted);font-size:11px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.staff-ui .breadcrumb span{opacity:.6;padding:0 2px}
.staff-ui .conversation-title h1{font-size:15px;letter-spacing:0;font-weight:650;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-top:3px}
.staff-ui .ticket-toolbar{display:flex;flex:none;gap:5px;align-items:center}
.staff-ui .ticket-toolbar button{font-size:12px}
.staff-ui #prev-ticket,.staff-ui #next-ticket{font-size:17px;padding:2px 8px}
.staff-ui .conversation-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}
.staff-ui .conversation-inner{width:100%;max-width:1040px;margin:0 auto;padding:18px 26px 20px}
.staff-ui .conversation-start{display:flex;justify-content:center;text-align:center;color:var(--muted);font-size:11px;gap:12px;align-items:center;margin:7px 0 18px}
.staff-ui .conversation-start:before,.staff-ui .conversation-start:after{content:"";height:1px;background:var(--line);flex:1}
.staff-ui .messages{display:flex;flex-direction:column;gap:18px;margin:0 0 14px;min-width:0}
.staff-ui .message{align-self:flex-start;width:fit-content;min-width:min(100%,280px);max-width:88%;padding:15px 17px;white-space:normal;overflow-wrap:anywhere;background:var(--panel);border:1px solid var(--line);border-radius:9px;box-shadow:0 1px 2px rgba(30,20,40,.035)}
.staff-ui .message.reply,.staff-ui .message.draft{align-self:flex-end;background:var(--reply);border:1px solid var(--reply-border)}
.staff-ui .message.note{align-self:center;width:100%;max-width:92%;background:var(--note);border:1px solid var(--note-border)}
.staff-ui .message.draft{background:var(--draft);border-color:var(--draft-border)}
.staff-ui .message-head{display:flex;align-items:center;gap:9px;white-space:normal;margin-bottom:11px;min-width:0}
.staff-ui .message-head .avatar{width:26px;height:26px;flex-basis:26px;font-size:10px}
.staff-ui .message-who{display:flex;flex-direction:column;min-width:0;gap:2px;flex:1}
.staff-ui .message-who strong{font-size:12px;line-height:1.3}
.staff-ui .message-who small{font-size:10px;color:var(--muted);line-height:1.3}
.staff-ui .message-head time{font-size:10.5px;color:var(--muted);white-space:nowrap}
.staff-ui .message-body{font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.staff-ui .message .row{margin-top:12px}
.staff-ui .audit-disclosure{font-size:11px;color:var(--muted);padding:10px 2px}
.staff-ui .audit-disclosure summary{cursor:pointer}
.staff-ui .audit-disclosure p{margin:8px 0;line-height:1.5}
.staff-ui #ticket-attachments .card{margin:8px 0}
.staff-ui .composer-wrap{padding:10px 26px 16px;background:var(--canvas);min-width:0;max-height:55vh;overflow-y:auto}
.staff-ui .composer-wrap>*{max-width:988px;margin-left:auto;margin-right:auto}
.staff-ui .composer{background:var(--panel);border:1px solid var(--line);border-radius:9px;overflow:hidden;box-shadow:0 1px 3px rgba(30,20,40,.05)}
.staff-ui .compose-head{display:flex;align-items:center;gap:14px;min-width:0;padding:9px 13px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.staff-ui .compose-control{display:flex;align-items:center;gap:5px;flex:none}
.staff-ui .compose-control label{margin:0;font-size:11px;font-weight:500}
.staff-ui .compose-control select{font-size:12px;padding:5px 8px;width:auto;background:var(--panel2)}
.staff-ui .compose-to{color:var(--muted);font-size:11.5px;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.staff-ui .compose-to[aria-hidden="true"]{visibility:hidden}
.staff-ui .composer textarea{width:100%;border:0;border-radius:0;resize:vertical;min-height:100px;height:132px;max-height:240px;padding:12px 15px;line-height:1.65;background:var(--panel);outline:none;box-shadow:none;font-size:13px;display:block}
.staff-ui .composer textarea:focus{box-shadow:none}
.staff-ui .composer[data-kind="note"] textarea{background:var(--note)}
.staff-ui .composer[data-kind="draft"] textarea{background:var(--panel)}
.staff-ui .draft-source:not(:empty){padding:5px 15px;font-size:11.5px}
.staff-ui #ticket-error:not(:empty){padding:5px 15px}
.staff-ui .compose-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 12px;border-top:1px solid var(--line)}
.staff-ui .compose-footer .row{gap:6px}
.staff-ui .assistant-action{color:var(--link);font-size:12px;background:var(--panel2)}
.staff-ui #mail-compose-notice{font-size:10.5px;line-height:1.4;padding:0 13px 9px;overflow-wrap:anywhere}
.staff-ui #email-activity{margin-top:0;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.staff-ui #email-activity button{font-size:11px}
.staff-ui .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.staff-ui .customer{grid-column:3;grid-row:1;min-width:0;min-height:0;overflow:auto;background:var(--panel);border-left:1px solid var(--line);border-right:0;padding:0;scrollbar-gutter:stable}
.staff-ui .context-section{padding:13px 14px;border-bottom:1px solid var(--line);min-width:0;overflow-wrap:anywhere}
.staff-ui .context-section>summary{display:flex;gap:8px;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;font-weight:650;font-size:12.5px}
.staff-ui .context-section>summary:after{content:"⌄";color:var(--muted);font-size:13px;margin-left:auto}
.staff-ui .context-section:not([open])>summary:after{content:"›"}
.staff-ui .context-section>summary::-webkit-details-marker{display:none}
.staff-ui .context-section>summary .muted{font-size:10px;font-weight:400}
.staff-ui .context-section>p,.staff-ui .context-section>details>p{margin-top:8px;font-size:12px}
.staff-ui .context-fields{display:grid;grid-template-columns:78px minmax(0,1fr);gap:8px 8px;align-items:center;margin-top:12px}
.staff-ui .context-fields label{margin:0;font-size:11.5px}
.staff-ui .context-fields input,.staff-ui .context-fields select{padding:5px 7px;font-size:12px}
.staff-ui .context-save,.staff-ui #details-error{grid-column:2}
.staff-ui .context-save{justify-self:start;font-size:11.5px}
.staff-ui #details-error:empty{display:none}
.staff-ui .contact-card{display:flex;gap:9px;align-items:center;margin:13px 0 15px}
.staff-ui .contact-card>div{min-width:0}
.staff-ui .contact-email{font-size:11.5px;overflow-wrap:anywhere}
.staff-ui .context-caption{font-size:11px;color:var(--muted);font-weight:400;margin:8px 0}
.staff-ui .related-ticket{display:grid;gap:7px;white-space:normal;text-align:left;width:100%;padding:9px 10px;margin:6px 0;background:var(--panel);font-size:11px}
.staff-ui .related-ticket strong{font-size:11.5px;font-weight:600;overflow-wrap:anywhere}
.staff-ui .related-ticket small{margin-left:4px}
.staff-ui .shopify-title{display:flex;gap:6px;align-items:center}
.staff-ui .shopify-mark{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:5px;background:#e3f0de;color:#3e753a;font-size:11px;font-weight:800}
.staff-ui .shopify-contact{margin-top:11px}
.staff-ui .shopify-contact strong{font-size:12.5px}
.staff-ui .context-section dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px 8px;margin:12px 0 4px;font-size:11.5px;line-height:1.45}
.staff-ui .context-section dt{color:var(--muted)}
.staff-ui .context-section dd{margin:0;overflow-wrap:anywhere;text-align:right}
.staff-ui .tag-list,.staff-ui .order-statuses{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.staff-ui .tag-list .badge{font-size:10px;padding:3px 5px}
.staff-ui .count-pill{font-size:10.5px;background:var(--neutral);color:var(--neutral-fg);border-radius:4px;padding:2px 6px}
.staff-ui .order-card{border:1px solid var(--line);border-radius:7px;margin:9px 0 0;overflow:hidden}
.staff-ui .order-card>summary{padding:9px;display:flex;align-items:center;gap:6px;cursor:pointer;font-size:12px;background:var(--panel2);list-style:none}
.staff-ui .order-card>summary::after{content:"›";color:var(--muted);font-size:14px}
.staff-ui .order-card[open]>summary:after{content:"⌄"}
.staff-ui .order-number{font-weight:650;min-width:0;flex:1}
.staff-ui .order-total{font-size:11px;color:var(--muted);font-weight:550}
.staff-ui .order-body{padding:10px 9px}
.staff-ui .order-line{display:flex;gap:6px;align-items:flex-start;font-size:11.5px;line-height:1.5;border-top:1px solid var(--line);padding:7px 0;overflow-wrap:anywhere}
.staff-ui .order-line>span{flex:none;color:var(--muted)}
.staff-ui .order-line small{display:block;font-size:10px}
.staff-ui .order-statuses{margin:8px 0}
.staff-ui .order-body p{font-size:11px;margin-top:7px}
.staff-ui .admin{grid-column:2;grid-row:1;width:100%;max-width:none;margin:0;overflow:auto;background:var(--canvas);padding:24px 32px;min-height:0;min-width:0}
.staff-ui .management-heading{max-width:1120px;margin:0 auto 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.staff-ui #admin-content{max-width:1120px;margin:auto}
.staff-ui .admin-grid{grid-template-columns:minmax(190px,260px) minmax(0,1fr)}
.staff-ui .admin .panel{max-width:760px;margin:18px auto}
.staff-ui .admin .ticket{background:var(--panel2);border-color:var(--line);white-space:normal}
.staff-ui .admin .ticket.selected{background:var(--selected)}
.staff-ui .admin .card>p{margin:8px 0}
.staff-ui .admin form>button{margin-top:10px}
.staff-ui .login{overflow:auto;margin:clamp(20px,7vh,65px) auto 24px;width:min(430px,calc(100% - 32px));padding:24px}
.staff-ui .login p{margin:8px 0}
.staff-ui .login button.primary{margin-top:13px}
@media (min-width:1550px){.staff-ui .workspace{grid-template-columns:224px minmax(0,1fr) 335px}.staff-ui .workspace[data-screen="inbox"],.staff-ui .workspace[data-screen="management"]{grid-template-columns:224px minmax(0,1fr)}}
@media (max-width:1180px){.staff-ui .workspace{grid-template-columns:175px minmax(0,1fr) 278px}.staff-ui .workspace[data-screen="inbox"],.staff-ui .workspace[data-screen="management"]{grid-template-columns:175px minmax(0,1fr)}.staff-ui .header-actions{gap:7px}.staff-ui .reply-default small,.staff-ui .staging-label{display:none}.staff-ui .conversation-inner{padding:14px 16px}.staff-ui .composer-wrap{padding:8px 16px 12px}.staff-ui .message{max-width:94%}.staff-ui .compose-head{gap:8px}.staff-ui .compose-to{flex-basis:100%;order:3}.staff-ui .compose-to[aria-hidden="true"]{display:none}.staff-ui .queue-table-header,.staff-ui .queue-ticket{grid-template-columns:minmax(0,1fr) 90px 115px 110px;gap:10px;padding-left:18px;padding-right:18px}}
@media (max-width:900px){body.staff-ui{height:auto;min-height:100dvh;overflow:auto}.staff-ui .header{height:auto;min-height:49px;padding:10px 12px;flex-wrap:wrap}.staff-ui .header-actions{flex-wrap:wrap}.staff-ui .workspace,.staff-ui .workspace[data-screen="inbox"],.staff-ui .workspace[data-screen="management"]{display:grid;grid-template-columns:1fr;grid-template-rows:auto;min-height:calc(100dvh - 52px);height:auto}.staff-ui #desk{overflow:visible}.staff-ui .sidebar{grid-column:1;grid-row:auto;border-right:0;border-bottom:1px solid var(--line);padding:10px;display:block}.staff-ui .sidebar-title{display:flex;align-items:center;justify-content:space-between;padding:0 4px 8px}.staff-ui .sidebar nav{display:flex;gap:3px;flex-wrap:wrap}.staff-ui .sidebar .view-btn{width:auto;white-space:nowrap;gap:5px}.staff-ui .sidebar .section-label,.staff-ui .sidebar-foot{display:none}.staff-ui .nav-group{margin-top:8px}.staff-ui .nav-group[open] .nav-btn{display:inline-flex;width:auto;white-space:normal}.staff-ui .main,.staff-ui .queue,.staff-ui .admin,.staff-ui .customer{grid-column:1;grid-row:auto}.staff-ui .main{min-height:65vh;grid-template-rows:auto minmax(240px,1fr) auto}.staff-ui .conversation-scroll{max-height:62vh}.staff-ui .composer-wrap{max-height:none}.staff-ui .customer{border-left:0;border-top:1px solid var(--line);overflow:visible}.staff-ui .queue{min-height:60vh}.staff-ui .queue-table-header,.staff-ui .queue-ticket{grid-template-columns:minmax(0,1fr) 86px 100px}.staff-ui .queue-table-header span:nth-child(3),.staff-ui .queue-assignee{display:none}.staff-ui .admin{padding:16px}.staff-ui .admin-grid{grid-template-columns:1fr}.staff-ui .inbox-heading{padding:17px 14px}.staff-ui .queue-search{padding:12px 14px}.staff-ui .conversation-header{padding:8px;gap:7px}.staff-ui .ticket-toolbar{gap:3px}.staff-ui .ticket-toolbar .badge{display:none}}
@media(max-width:480px){.staff-ui .queue-table-header,.staff-ui .queue-ticket{grid-template-columns:minmax(0,1fr) 66px;gap:8px;padding:10px 12px}.staff-ui .queue-table-header span:last-child,.staff-ui .queue-updated{display:none}.staff-ui .header-actions #user-label{max-width:120px}.staff-ui .header-actions .reply-default label{display:none}.staff-ui .conversation-inner{padding:10px 12px}.staff-ui .composer-wrap{padding:7px 10px 12px}.staff-ui .message{max-width:100%;min-width:0}.staff-ui .message-head time{font-size:9px}.staff-ui .compose-footer{padding:8px}.staff-ui .conversation-heading{gap:6px}.staff-ui .conversation-title h1{font-size:13px}}

/* Help Center library and customer article browsing; ticket layout is unchanged. */
.staff-ui .kb-manager{display:grid;gap:16px}
.staff-ui .kb-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:8px}
.staff-ui .kb-tabs button.selected,.staff-ui .kb-row.selected{background:var(--selected);border-color:var(--accent)}
.staff-ui .kb-stats{display:flex;flex-wrap:wrap;gap:20px;padding:12px 0;font-size:12px;color:var(--muted)}
.staff-ui .kb-stats strong{font-size:17px;color:var(--fg);margin-right:4px}
.staff-ui .kb-layout{display:grid;grid-template-columns:minmax(210px,300px) minmax(0,1fr);gap:16px;align-items:start}
.staff-ui .kb-list{display:grid;gap:10px}
.staff-ui .kb-list #kb-list,.staff-ui #kb-candidates{max-height:64vh;overflow:auto}
.staff-ui .kb-row{display:grid;width:100%;text-align:left;white-space:normal;gap:5px;padding:10px;margin-bottom:5px}
.staff-ui .kb-row strong{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.staff-ui .kb-editor{min-width:0}
.staff-ui .kb-editor textarea{min-height:280px;line-height:1.65}
.staff-ui .kb-editor p,.staff-ui .kb-import-controls p,.staff-ui .kb-bot p{margin:9px 0}
.staff-ui .kb-actions{margin-top:12px}
.staff-ui .kb-preview,.staff-ui .kb-revision pre{font:inherit;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--panel2);border:1px solid var(--line);padding:14px;border-radius:6px;max-height:480px;overflow:auto;margin:12px 0}
.staff-ui .kb-revision{margin-top:10px;border-top:1px solid var(--line);padding:10px 0}
.staff-ui .kb-revision summary{cursor:pointer}
.staff-ui .kb-import-controls{margin-bottom:16px}
.staff-ui .kb-import-row input{flex:1;min-width:200px}
.staff-ui .kb-import-row select{width:auto;max-width:240px}
.staff-ui .kb-bot{max-width:780px;margin:auto}
.staff-ui #kb-status:empty{display:none}
.help-ui .hero{padding-top:48px;padding-bottom:36px}
.help-ui .help-wrap{max-width:1120px}
.help-ui .category-grid{gap:14px}
.help-ui .category-grid .category{min-height:118px;justify-content:start;align-content:start;gap:8px}
.help-ui .category-grid .category h3{font-size:15px;line-height:1.4}
.help-ui .help-icon{display:block;font-size:23px;color:var(--accent);font-weight:500}
.help-ui .article-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:16px;text-align:left}
.help-ui .article-row strong{font-size:14px}
.help-ui .article-row small{grid-row:2;grid-column:1}
.help-ui .article-arrow{grid-column:2;grid-row:1/span 2;align-self:center;color:var(--muted);font-size:22px}
.help-ui .help-article{max-width:820px;margin:24px auto;padding:30px}
.help-ui .help-breadcrumb{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin-bottom:18px;font-size:12px;color:var(--muted)}
.help-ui .help-breadcrumb button{border:0;padding:2px 5px;font-size:12px;text-align:left;white-space:normal;color:var(--accent)}
.help-ui .help-article h1{font-size:28px;line-height:1.3;margin-bottom:10px}
.help-ui .help-article .article-body{white-space:normal;line-height:1.75}
.help-ui .article-body p,.help-ui .article-body ul{margin:0 0 17px}
.help-ui .article-body h3{font-size:19px;margin:24px 0 10px}
.help-ui .article-body li{margin-bottom:6px}
.help-ui .article-end{margin-top:24px;border-top:1px solid var(--line);padding-top:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.help-ui .bot-answer{margin:9px 0;white-space:pre-wrap}
.help-ui .bot-sources{margin-top:10px;border-top:1px solid var(--line);padding-top:10px;font-size:12px}
.help-ui .bot-question{padding:8px 2px}
@media(max-width:900px){.staff-ui .kb-layout{grid-template-columns:1fr}.staff-ui .kb-list #kb-list,.staff-ui #kb-candidates{max-height:38vh}}
@media(max-width:600px){.help-ui .help-article{padding:18px}.help-ui .category-grid{grid-template-columns:1fr 1fr}.help-ui .help-article h1{font-size:24px}}

/* Separate Responses drafting dialog and floating customer conversation. */
.staff-ui .responses-dialog{color:var(--fg);background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:0;width:min(1040px,calc(100vw - 32px));max-height:90dvh;overflow:auto;box-shadow:0 18px 70px #0004}
.staff-ui .responses-dialog::backdrop{background:#17141f99}
.staff-ui .responses-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}
.staff-ui .responses-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;padding:18px}
.staff-ui .responses-inputs,.staff-ui .responses-output{display:flex;flex-direction:column;gap:8px;min-width:0}
.staff-ui .responses-content label{margin:4px 0 0}.staff-ui .responses-content textarea{resize:vertical;line-height:1.55}
.staff-ui .responses-confirm{display:flex;align-items:flex-start;gap:7px;line-height:1.5}
.staff-ui .responses-output #responses-draft{min-height:270px;flex:1}
.staff-ui #responses-review:not(:empty){background:var(--note);border:1px solid var(--note-border);border-radius:6px;padding:10px;font-size:12px}
.staff-ui #responses-review p{margin-top:6px}.staff-ui #responses-sources{font-size:12px}
.staff-ui #rg-base{white-space:pre-wrap;line-height:1.65}
.help-ui #chat-launcher{position:fixed;bottom:22px;right:24px;z-index:30;border-radius:24px;padding:13px 22px;box-shadow:0 5px 20px #0003}
.help-ui .chat-panel{position:fixed;bottom:83px;right:24px;width:min(405px,calc(100vw - 28px));height:min(620px,calc(100dvh - 110px));z-index:31;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:13px;overflow:hidden;box-shadow:0 10px 45px #0005}
.help-ui .chat-head{display:flex;align-items:center;gap:8px;background:var(--panel2);border-bottom:1px solid var(--line);padding:13px}
.help-ui .chat-head>div{display:grid;gap:3px;flex:1}.help-ui .chat-head button{font-size:12px;padding:6px 9px}
.help-ui .chat-privacy{font-size:11px;color:var(--muted);padding:9px 13px;border-bottom:1px solid var(--line)}
.help-ui #bot-conversation{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:13px;padding:13px;overscroll-behavior:contain}
.help-ui .chat-user,.help-ui .chat-bot{font-size:13px;line-height:1.65;padding:11px 13px;border-radius:10px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:92%}
.help-ui .chat-user{align-self:flex-end;background:#51406c;color:#fff}.help-ui .chat-bot{align-self:flex-start;background:var(--panel2);border:1px solid var(--line)}
.help-ui .chat-bot .bot-answer{margin:0}.help-ui .chat-bot .bot-sources{display:grid;gap:6px;white-space:normal}
.help-ui .chat-bot button{display:block;margin-top:10px;font-size:12px}.help-ui .chat-topics{display:flex;gap:6px;flex-wrap:wrap}
.help-ui .chat-topics button{font-size:12px;padding:6px 9px}.help-ui #chat-typing,.help-ui #bot-error{font-size:12px;padding:4px 13px}
.help-ui #bot-form{display:flex;gap:7px;padding:10px 12px;border-top:1px solid var(--line)}.help-ui #handoff{margin:0 12px 12px;font-size:12px}
.help-ui .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:720px){.staff-ui .responses-content{grid-template-columns:1fr;padding:12px}.help-ui .chat-panel{right:10px;bottom:74px;width:calc(100vw - 20px)}.help-ui #chat-launcher{right:12px;bottom:14px}}

/* Shared formatted article display and explicit bulk publishing. */
.staff-ui .kb-bulk-bar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.staff-ui .kb-publish-dialog{color:var(--fg);background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:20px;width:min(680px,calc(100vw - 32px));max-height:86dvh;overflow:auto}
.staff-ui .kb-publish-dialog::backdrop{background:#17141f99}
.staff-ui .kb-publish-dialog p{margin:9px 0;line-height:1.55}
.staff-ui .kb-publish-dialog details{margin:12px 0}
.staff-ui .kb-bulk-list{max-height:250px;overflow:auto;padding:8px 12px;border:1px solid var(--line);border-radius:6px}
.staff-ui .kb-format-tools{margin-top:9px}
.staff-ui .article-format-preview{border:1px solid var(--line);border-radius:7px;background:var(--panel);padding:16px;margin:12px 0;line-height:1.65;overflow-wrap:anywhere;max-height:65vh;overflow:auto}
.article-format-preview h2,.article-format-preview h3,.article-format-preview h4,.article-format-preview h5,.article-format-preview h6,.help-ui .article-body h2,.help-ui .article-body h3,.help-ui .article-body h4,.help-ui .article-body h5,.help-ui .article-body h6{line-height:1.35;margin:22px 0 10px;font-weight:650}
.article-format-preview h2,.help-ui .article-body h2{font-size:21px}
.article-format-preview h3,.help-ui .article-body h3{font-size:18px}
.article-format-preview h4,.help-ui .article-body h4{font-size:16px}
.article-format-preview h5,.article-format-preview h6,.help-ui .article-body h5,.help-ui .article-body h6{font-size:14px}
.article-format-preview p,.article-format-preview ul,.article-format-preview ol,.help-ui .article-body ol{margin:0 0 12px}
.article-format-preview li,.help-ui .article-body li{margin-bottom:5px}
.article-format-preview blockquote,.help-ui .article-body blockquote{border-left:3px solid var(--accent);padding:8px 12px;margin:12px 0;color:var(--muted)}
.article-format-preview hr,.help-ui .article-body hr{border:0;border-top:1px solid var(--line);margin:18px 0}
.help-ui .chat-bot .bot-answer p{margin:0 0 10px}.help-ui .chat-bot .bot-answer p:last-child{margin-bottom:0}
.help-ui .chat-bot .bot-answer h2,.help-ui .chat-bot .bot-answer h3,.help-ui .chat-bot .bot-answer h4{font-size:14px;margin:12px 0 7px}

/* Staff workflow tools — preserve the existing three-column ticket layout. */
.staff-ui .queue-filters{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.staff-ui .queue-filters select{width:auto;max-width:210px;padding:7px 10px}
.staff-ui .queue-pagination{display:flex;align-items:center;justify-content:center;gap:12px;padding:9px 14px;border-top:1px solid var(--line);background:var(--panel);flex:none}
.staff-ui .queue-priority{display:block;font-size:10px;text-transform:capitalize;margin-top:3px;font-weight:650}
.staff-ui .queue-priority.urgent{color:var(--error)}.staff-ui .queue-priority.high{color:var(--amber-fg)}
.staff-ui .tag-chips{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 7px}
.staff-ui .ticket-tag{display:inline-flex;align-items:center;gap:4px;background:var(--selected);border-radius:5px;padding:3px 5px;font-size:11px;overflow-wrap:anywhere;max-width:100%}
.staff-ui .ticket-tag button{padding:0 4px;background:transparent;border:0;font-size:13px}
.staff-ui .tag-entry{flex-wrap:nowrap;gap:4px}.staff-ui .tag-entry input{min-width:0}
.staff-ui .ticket-tag-editor{min-width:0}.staff-ui .ticket-tag-editor small{font-size:10px}
.staff-ui .composer-tools{flex-wrap:wrap}
.staff-ui .macro-dialog{color:var(--fg);background:var(--panel);border:1px solid var(--line);border-radius:12px;width:min(850px,calc(100vw - 28px));max-height:87dvh;overflow:auto;padding:20px}
.staff-ui .macro-dialog::backdrop{background:#17141f99}
.staff-ui .macro-dialog>input{margin:13px 0}
.staff-ui .macro-picker-grid{display:grid;grid-template-columns:minmax(160px,245px) minmax(0,1fr);gap:16px}
.staff-ui .macro-pick-list{max-height:54vh;overflow:auto}
.staff-ui .macro-pick-preview{min-width:0;border-left:1px solid var(--line);padding-left:16px}
.staff-ui #macro-pick-body{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;line-height:1.65;min-height:115px;max-height:38vh;overflow:auto;background:var(--panel2);padding:12px;border:1px solid var(--line);border-radius:6px}
.staff-ui #macro-manager>p{margin-bottom:15px}
.staff-ui .macro-vars{display:flex;gap:5px;flex-wrap:wrap;align-items:center;margin:9px 0}
.staff-ui .macro-vars button{font-size:11px}
.staff-ui .macro-active{display:flex;gap:6px;align-items:center;margin:12px 0}
@media(max-width:640px){.staff-ui .macro-picker-grid{grid-template-columns:1fr}.staff-ui .macro-pick-list{max-height:28vh}.staff-ui .macro-pick-preview{border-left:0;padding-left:0}.staff-ui .queue-filters select{max-width:100%}}

/* Rich email composer, files and read-only customer search */
.staff-ui .rich-toolbar{display:flex;gap:5px;flex-wrap:wrap;padding:6px 12px;border-bottom:1px solid var(--line)}
.staff-ui .rich-toolbar button{padding:4px 8px;font-size:12px;min-width:26px}
.staff-ui .rich-toolbar button:first-child{font-weight:800}.staff-ui .rich-toolbar button:nth-child(2){font-style:italic}.staff-ui .rich-toolbar button:nth-child(3){text-decoration:underline}
.staff-ui .rich-editor{min-height:116px;max-height:260px;overflow:auto;padding:12px 15px;line-height:1.65;background:var(--panel);font-size:13px;outline:none;white-space:pre-wrap;overflow-wrap:anywhere}
.staff-ui .rich-editor:empty:before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.staff-ui .rich-editor:focus{box-shadow:inset 0 0 0 1px var(--accent)}.staff-ui .composer[data-kind="note"] .rich-editor{background:var(--note)}
.staff-ui .rich-editor ul,.staff-ui .rich-editor ol,.staff-ui .rich-history ul,.staff-ui .rich-history ol{padding-left:24px;margin:5px 0}
.staff-ui .rich-editor p,.staff-ui .rich-history p{margin:0 0 8px}
.staff-ui .rich-history{white-space:normal}.staff-ui .outgoing-history{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}
.staff-ui .outbound-subject{font-size:11px;margin-top:8px;overflow-wrap:anywhere}
.staff-ui .outgoing-attach{padding:6px 12px;border-top:1px solid var(--line)}
.staff-ui #outgoing-files{width:auto;max-width:100%;font-size:11px;padding:4px}
.staff-ui .attachment-label{font-size:12px;margin:0}.staff-ui .outgoing-attach .tag-chips{margin:5px 0}
.staff-ui #outgoing-file-note{font-size:11px}
.staff-ui #outbound-panel{max-width:730px;margin:auto}
.staff-ui #outbound-results{display:grid;gap:6px;max-height:45vh;overflow:auto;margin:14px 0}
.staff-ui .customer-choice{display:flex;align-items:flex-start;flex-direction:column;gap:4px;padding:10px;text-align:left;background:var(--panel2)}
.staff-ui #outbound-create{margin-top:15px}.staff-ui #outbound-create button{margin-top:12px}.staff-ui #outbound-panel>p{margin:9px 0}

/* Manual ticket management */
.ticket-life-actions{display:grid;gap:8px;padding-top:10px}.ticket-life-actions button{text-align:left;width:100%}.ticket-life-actions p{margin:0}.merge-results{display:grid;gap:6px;max-height:280px;overflow:auto;margin:12px 0}.snooze-presets{flex-wrap:wrap;margin:12px 0}#ticket-management-dialog [data-content]{display:grid;gap:12px}#ticket-management-dialog [data-content] input{min-width:0}

/* Brand asset only: keep the existing staff header dimensions and layout. */
.staff-ui .header .brand-logo{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:0;max-width:200px;padding:4px 8px;background:#1a1a23;border-radius:5px;line-height:1;text-decoration:none}
.staff-ui .header .brand-logo img{display:block;width:168px;height:29px;max-width:100%;object-fit:contain;object-position:center}
@media(max-width:600px){.staff-ui .header .brand-logo{max-width:150px}.staff-ui .header .brand-logo img{width:132px;height:26px}}
.staff-ui .submitted-order-number{margin:0 0 10px;overflow-wrap:anywhere}.staff-ui .submitted-order-number strong{display:block;margin:3px 0;font-size:13px}


/* Signature is outside the editable message; only app-owned profile data is shown. */
.staff-ui .signature-preview{padding:2px 15px 14px}
.staff-ui .signature-caption{font-size:10px;line-height:16px;color:var(--muted);margin-bottom:8px}
.staff-ui .signature-card{display:flex;align-items:flex-start;font-family:Arial,Helvetica,sans-serif;width:320px;max-width:100%;color:var(--fg)}
.staff-ui .signature-logo{display:block;flex:0 0 98px;padding:4px 14px 0 0}
.staff-ui .signature-logo img{display:block;width:84px;height:74px;border:0}
.staff-ui .signature-details{min-width:0;border-left:1px solid var(--line);padding-left:14px}
.staff-ui .signature-name{display:block;font-size:17px;line-height:22px;font-weight:700}
.staff-ui .signature-title{font-size:12px;line-height:18px;color:var(--muted)}
.staff-ui .signature-brand{font-size:12px;line-height:18px;font-weight:700;color:var(--accent)}
.staff-ui .signature-accent{width:88px;height:3px;margin:7px 0;background:linear-gradient(to right,#fa7e1e 0 25%,#d62976 25% 50%,#962fbf 50% 75%,#4f5bd5 75% 100%)}
.staff-ui .signature-contact{display:block;font-size:12px;line-height:18px;color:var(--link);text-decoration:none;overflow-wrap:anywhere}
.staff-ui .signature-contact:hover{text-decoration:underline}
