/* The staff inbox has one navigation system; customer support keeps its own theme. */
.staff-view{--text:#e3e9f4;--muted:#8291aa;--line:#263145;--violet:#7592ff;background:#0d131f;color:var(--text)}
.staff-view .shell{max-width:1680px;padding:0 24px 20px}
.staff-view .topbar{height:76px;margin:0;border-bottom:1px solid #263145}
.staff-view .brand b{color:#e3e9f4;letter-spacing:.15em}
.staff-view .brand small{color:#7887a2;font-size:9px}
.staff-view .brand-mark{background:#7592ff;box-shadow:none;border-radius:11px;width:36px;height:36px}
.staff-view .secure-label{color:#8291aa;font-size:11px}
.staff-view .icon,.staff-view .quiet,.staff-view .back-app{background:#161e2e;border:1px solid #2b374d;color:#a0aec5;border-radius:7px;box-shadow:none}
.staff-view .back-app{font-size:11px}
.staff-view .admin-logout{color:#8291aa}
.staff-view #layout{display:grid;grid-template-columns:190px 330px minmax(0,1fr);gap:0;height:calc(100dvh - 96px);min-height:500px;max-width:none;margin:0;padding-top:18px}
.staff-nav{display:flex;flex-direction:column;padding:16px 16px 12px 0;min-height:0}
[dir=rtl] .staff-nav{padding:16px 0 12px 16px}
.staff-nav-title{display:flex;gap:10px;align-items:center;margin:0 8px 28px}
.staff-team-icon{display:grid;place-items:center;background:#253251;color:#7592ff;border-radius:8px;width:32px;height:32px;font:700 15px var(--sans)}
.staff-nav-title b{display:block;font-size:13px}
.staff-nav-title small{display:block;font-size:10px;color:#8494af;margin-top:2px}
.nav-section-label{font-size:9px;letter-spacing:.1em;color:#6e809e;font-weight:700;padding:0 11px 10px}
.queue-views{display:flex;flex-direction:column;gap:3px}
.queue-view{display:flex;align-items:center;gap:9px;border:0;background:transparent;border-radius:7px;padding:11px 10px;color:#97a6c0;text-align:start;font:12px var(--sans);cursor:pointer;transition:background .15s,color .15s}
[dir=rtl] .queue-view{font-family:var(--font)}
.queue-view b{font-weight:500}
.queue-view>span{width:18px;text-align:center;font-size:16px}
.queue-view:hover{background:#202c41;color:#d6dfef}
.queue-view.active{color:#a4b8ff;background:#263758}
.queue-view.active b{font-weight:700}
.nav-divider{height:1px;background:#27324a;margin:14px 10px}
.staff-tools{margin-top:18px;padding:12px 0;border-top:1px solid #27324a}
.staff-tools .admin-tab{background:none;color:#97a6c0;border:0;padding:11px;text-align:start;border-radius:7px;width:100%;font-size:12px}
.staff-tools .admin-tab.active{background:#263758;color:#a4b8ff}
.staff-nav-footer{margin-top:auto;padding:18px 10px 4px;display:flex;align-items:center;gap:7px;font-size:10px;color:#657896}
.staff-online-dot{width:6px;height:6px;border-radius:50%;background:#34b389}
.staff-view #layout>.tickets{display:flex;flex-direction:column;background:#161e2e;border:1px solid #29364d;border-radius:10px 0 0 10px;padding:0;max-height:100%;min-height:0;overflow:hidden;box-shadow:none}
[dir=rtl] .staff-view #layout>.tickets{border-radius:0 10px 10px 0}
.staff-view .tickets>.section-head{padding:20px 18px 15px;margin:0;flex-wrap:nowrap}
.staff-view #ticketsEyebrow{display:none}
.staff-view #ticketsTitle{font-size:16px;letter-spacing:-.02em;color:#e2e9f7;line-height:1.5}
.queue-result-count{display:grid;place-items:center;background:#263249;color:#99aac5;border-radius:6px;min-width:26px;padding:3px 7px;font:600 11px var(--sans)}
.staff-view #supportStats,.staff-view #adminWrap>.divider,.staff-view #adminWrap>.section-head,.staff-view #adminWrap>.admin-tabs,.staff-view #adminStatus,.staff-view #aiNotice{display:none!important}
.staff-view .ticket-search{margin:0 16px 10px;background:#101826;border:1px solid #2b374e;border-radius:7px;flex-shrink:0}
.staff-view .ticket-search input{color:#c1cde1;font-size:12px;padding:9px 0}
.staff-view #adminWrap{display:flex;flex-direction:column;flex:1;min-height:0}
.staff-view #adminCategory{margin:0 16px 13px;width:calc(100% - 32px);padding:7px 9px;border:1px solid #2c3a52;background:#161e2e;color:#98a9c4;border-radius:6px;font-size:11px;flex-shrink:0}
.staff-view #adminList{display:flex;flex-direction:column;gap:0;margin:0;border-top:1px solid #2a3750;overflow:auto;flex:1;min-height:0}
.staff-view #adminList>.muted{padding:20px;color:#7f92b2;font-size:12px;line-height:1.8}
.staff-view .ticket{grid-template-columns:minmax(0,1fr);gap:7px;border:0;border-bottom:1px solid #263248;border-inline-start:3px solid transparent;border-radius:0;background:#161e2e;padding:16px 17px;text-align:start;flex-shrink:0}
.staff-view .ticket:hover{background:#1c2940}
.staff-view .ticket.selected{background:#233455;border-inline-start-color:#7d9aff}
.staff-view .ticket.needs-human-review{background:#221f22;border-inline-start-color:#b9914d}
.staff-view .ticket.needs-human-review.selected{background:#30291f;border-inline-start-color:#d9b163}
.staff-view .ticket-symbol{display:none}
.staff-view .ticket-copy{padding:0}
.staff-view .ticket strong{color:#d9e2f2;font-size:12px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.55}
.staff-view .ticket small{font-size:11px;line-height:1.5;margin:7px 0;color:#8d9db7;-webkit-line-clamp:1}
.staff-view .ticket-foot{font-size:9px;color:#697d9d}
.staff-view .ticket-tags{gap:6px;font-size:9px;margin-top:6px}
.staff-view .ticket-tags>span{background:#263249;border:0;color:#8ea2c1;padding:3px 6px;border-radius:4px}
.staff-view .ticket-tags .urgent-tag{background:#392631!important;color:#e8a28d!important;border:0!important}
.staff-view .ticket .badge{grid-column:1;color:#8da1c2;background:#26334b;border:0;border-radius:4px;padding:3px 6px;max-width:none!important;font-size:9px;font-style:normal}
.staff-view .ticket .badge.ai_answered{background:#46381f;color:#e7c475}
.staff-view .ticket .badge.reviewing{background:#302e4f;color:#b7aae8}
.staff-view .ticket .badge.answered{background:#223b35;color:#8bbea4}
.staff-view #layout>.conversation{height:100%;min-height:0;background:#161e2e;border:1px solid #29364d;border-inline-start:0;border-radius:0 10px 10px 0;box-shadow:none}
[dir=rtl] .staff-view #layout>.conversation{border-radius:10px 0 0 10px}
.staff-view .thread-head{background:#161e2e;padding:19px 22px;border-bottom:1px solid #2a3750}
.staff-view .thread-title-row h2{font-size:16px;color:#dce5f7}
.staff-view .thread-head p{font-size:10px;color:#7085a6}
.staff-view .thread-avatar{background:#2a385b;color:#a0b5ff;box-shadow:none;border-radius:9px}
.staff-view .thread-actions{gap:6px;flex-wrap:wrap}
.staff-view .thread-actions .quiet{font-size:10px;height:31px;border-color:#2d3b55}
.staff-view #closeTicket{background:#253c35;color:#9bc9ab;border-color:#365348}
.staff-view .thread-status{background:#141d2c;color:#8094b4;border-bottom:1px solid #293650;font-size:11px;padding:10px 22px}
.staff-view .ticket-context{background:#161e2e;border-bottom:1px solid #293650}
.staff-view .context-tags>span{background:#233149;color:#90a4c3;border-color:#32415c}
.staff-view .server-context{background:#111b2a;border-color:#29374e}
.staff-view .server-context-grid>div{background:#1e2c42}
.staff-view .messages{background:#111927;padding:26px;gap:18px}
.staff-view .message-day{background:#263249;border-color:#2b3a53;color:#8296b6}
.staff-view .bubble{background:#161e2e;border:1px solid #2b3a53;color:#c0cee3;box-shadow:0 2px 4px #23375604;border-radius:10px;font-size:13px}
.staff-view .bubble.mine{background:#223554;border-color:#364d75;border-radius:10px}
.staff-view .bubble.system-message{background:#2a251f;border-color:#493e2c}
.staff-view .message-author{color:#97aacc;font-size:10px}
.staff-view .message-author>span{background:#2b3a54;color:#a2b5d6;border-radius:6px}
.staff-view .system-message .message-author{color:#c6ae76}
.staff-view .reply{background:#161e2e;border-top:1px solid #2a3750;padding:16px 22px}
.staff-view .reply textarea{background:#111927;border-color:#2e3e59;color:#c4d2e7;border-radius:8px;font-size:13px}
.staff-view .reply .primary,.staff-view .primary{background:#5379e6;color:#fff;border:0;box-shadow:none;border-radius:8px}
.staff-view .attach-button{background:#26364f;border-color:#344563;color:#a8bbdf;border-radius:8px}
.staff-view .composer-footer{color:#6c80a0;font-size:9px}
.staff-view .empty{background:#161e2e}
.staff-view .empty h2{color:#b8c9e5;font-size:20px}
.staff-view .empty p{color:#8398b9;font-size:12px;max-width:320px}
.staff-view .empty .section-eyebrow{color:#5e7699;letter-spacing:.1em}
.staff-view .empty-art{opacity:.3;filter:grayscale(1)}
.staff-view .admin-faq-panel{background:#161e2e;color:#c4d2e7}
.staff-view .admin-faq-card,.staff-view dialog{background:#161e2e;border-color:#2b3e5a;color:#c4d2e7}
.staff-view dialog input,.staff-view dialog textarea,.staff-view .admin-faq-fields textarea,.staff-view .admin-faq-fields input{background:#101c2c;border-color:#2b3e5a;color:#c4d2e7}
.staff-view .attachment-card,.staff-view .file-preview{background:#1b2c43;border-color:#2b3e5a}
.staff-view .attachment-card button{background:#161e2e;color:#aabfde;border-color:#30496c}
.staff-view .back-chats{display:none}
.staff-view #layout.faq-open{grid-template-columns:190px minmax(0,1fr)}
.staff-view #layout.faq-open>.tickets{display:none}
.staff-view #layout.faq-open>.conversation{border:1px solid #29364d;border-radius:10px}
.staff-view .admin-faq-panel{height:100%;overflow:auto}
@media(max-width:1150px){.staff-view .shell{padding-inline:14px}.staff-view #layout{grid-template-columns:164px 290px minmax(0,1fr)}.staff-view .thread-head{padding:16px}.staff-view .thread-title-row h2{font-size:14px}.staff-view .thread-head{flex-wrap:wrap;gap:12px}}
@media(max-width:850px){.staff-view #layout{grid-template-columns:140px 250px minmax(0,1fr)}.queue-view{font-size:11px;padding:10px 6px;gap:6px}.staff-nav{padding-inline-end:8px}.staff-view .thread-actions{margin:0}.staff-view .thread-title-row h2{font-size:13px}.staff-view .thread-avatar{display:none}.staff-nav-title{gap:7px;margin-inline:4px}.staff-nav-title small{font-size:8px}}
@media(max-width:680px){.staff-view .shell{padding:0 10px 10px}.staff-view .topbar{height:62px}.staff-view .topbar-right{gap:5px}.staff-view .back-app{display:none}.staff-view #layout{display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);height:calc(100dvh - 72px);min-height:0;padding-top:8px;gap:8px}.staff-view .staff-nav{padding:0;overflow:hidden}.staff-nav-title,.staff-nav-footer,.nav-section-label,.staff-tools,.nav-divider{display:none}.queue-views{flex-direction:row;overflow:auto;gap:4px;padding-bottom:4px}.queue-view{flex:none;white-space:nowrap;font-size:10px;padding:9px}.staff-view #layout>.tickets{display:flex;border-radius:8px;max-height:none}.staff-view #layout>.conversation{display:none;border:1px solid #29364d;border-radius:8px}.staff-view #layout.chat-open>.tickets,.staff-view #layout.faq-open>.tickets{display:none}.staff-view #layout.chat-open>.conversation,.staff-view #layout.faq-open>.conversation{display:block}.staff-view .back-chats{display:inline-flex}.staff-view .thread-head{padding:12px}.staff-view .messages{padding:16px}.staff-view .reply{padding:12px}.staff-view .reply .primary{min-width:60px}.staff-view .empty h2{font-size:17px}}

@media(max-width:680px){.staff-view #layout.faq-open{grid-template-columns:1fr}.staff-view .staff-nav{display:flex;flex-direction:row;gap:6px}.staff-view .queue-views{flex:1;min-width:0}.staff-view .staff-tools{display:block;flex:none;margin:0;padding:0;border:0}.staff-view .staff-tools .admin-tab{width:auto;padding:9px;font-size:10px}}
