.aki-help{--help-bg:#111525;--help-panel:#191e30;--help-soft:#22283d;--help-border:#343c55;--help-ink:#f4f5ff;--help-muted:#b9c0d7;--help-purple:#b6a1ff;--help-tint:#332b50;--help-note:#352e20;--help-note-ink:#f4daa3;color:var(--help-ink);display:grid;gap:18px;min-width:0;font-size:14px}
html[data-theme="light"] .aki-help{--help-bg:#fff;--help-panel:#f7f8fc;--help-soft:#f0f1f7;--help-border:#d9deeb;--help-ink:#202439;--help-muted:#59637b;--help-purple:#6740cf;--help-tint:#eee8ff;--help-note:#fff5de;--help-note-ink:#6e4b0e}
.aki-help *{box-sizing:border-box}.aki-help button,.aki-help input,.aki-help textarea,.aki-help select{font:inherit}.aki-help button{cursor:pointer}.aki-help button:disabled{cursor:wait;opacity:.55}.aki-help svg{width:19px;height:19px;flex-shrink:0}.aki-help h1,.aki-help h2,.aki-help h3,.aki-help p{margin:0}.aki-help h1{font-size:clamp(23px,2vw,30px);line-height:1.2;margin:5px 0 8px}.aki-help h2{font-size:17px;line-height:1.4}.aki-help p,.aki-help small{color:var(--help-muted)}.aki-help .action-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;border:1px solid var(--help-border);background:var(--help-bg);color:var(--help-ink);border-radius:10px;padding:9px 13px;white-space:nowrap;box-shadow:none}.aki-help .action-btn.primary{background:#7548df;color:#fff;border-color:#7548df}.aki-help button:focus-visible,.aki-help input:focus-visible,.aki-help textarea:focus-visible,.aki-help select:focus-visible,.help-attach:focus-within{outline:3px solid var(--help-purple);outline-offset:2px}.help-heading{display:flex;gap:16px;align-items:center;justify-content:space-between}.help-heading p{line-height:1.6}.help-heading-actions{display:flex;gap:8px}.help-eyebrow{color:var(--help-muted);font-size:11px;font-weight:650;letter-spacing:.04em}.help-view-tabs,.help-filters{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:2px 2px 5px}.help-view-tabs button,.help-filters button,.help-compose-tabs button{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid var(--help-border);border-radius:9px;background:var(--help-bg);color:var(--help-muted);white-space:nowrap;min-height:39px}.help-view-tabs button[aria-pressed="true"],.help-filters button[aria-pressed="true"]{background:var(--help-tint);color:var(--help-purple);border-color:var(--help-purple);font-weight:650}.help-filters span{font-size:11px;background:var(--help-soft);border-radius:20px;padding:1px 6px;min-width:20px;text-align:center;color:var(--help-ink)}.help-layout{display:grid;grid-template-columns:minmax(245px,30%) minmax(0,1fr);min-height:540px;height:min(740px,calc(100dvh - 265px));background:var(--help-bg);border:1px solid var(--help-border);border-radius:15px;overflow:hidden}.help-layout.staff{grid-template-columns:minmax(230px,28%) minmax(0,1fr) 220px}.help-list{display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid var(--help-border);background:var(--help-panel)}.help-search{display:flex;align-items:center;gap:5px;padding:15px;border-bottom:1px solid var(--help-border)}.help-search label{display:flex;align-items:center;gap:8px;min-width:0;flex:1;color:var(--help-muted)}.aki-help .help-search input{width:100%;min-width:0;border:0;background:transparent;color:var(--help-ink);padding:5px 0;outline-offset:0}.help-search .mini-btn{border:0;color:var(--help-muted);background:transparent;min-width:30px;min-height:36px}.help-ticket-list{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain;touch-action:pan-y}.help-ticket{display:grid;gap:8px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--help-border);border-left:3px solid transparent;background:transparent;padding:16px;color:var(--help-ink);touch-action:pan-y}.help-ticket.active{background:var(--help-tint);border-left-color:var(--help-purple)}.help-ticket:hover{background:var(--help-soft)}.help-ticket>div,.help-ticket footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.help-ticket>strong{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.help-ticket>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.help-ticket footer{font-size:11px;color:var(--help-muted)}.help-ticket time{font-size:10px}.help-unread{display:inline-block;width:7px;height:7px;background:var(--help-purple);border-radius:50%;margin:0 6px 1px 0}.help-status{font-size:11px;display:inline-flex;padding:3px 7px;background:var(--help-soft);color:var(--help-muted);border-radius:6px;line-height:1.4}.help-status.high,.help-status.urgent{background:#542a3c;color:#ffd4df}html[data-theme="light"] .help-status.high,html[data-theme="light"] .help-status.urgent{background:#fce6ec;color:#932242}.help-status.waiting_user,.help-status.open,.help-status.in_progress{background:var(--help-tint);color:var(--help-purple)}.help-pagination{padding:12px 9px;display:flex;align-items:center;justify-content:space-between;gap:5px;border-top:1px solid var(--help-border);font-size:11px}.aki-help .help-pagination .action-btn{padding:5px;font-size:11px;min-height:34px;gap:2px}.help-pagination .action-btn svg{width:14px}.help-thread{min-width:0;min-height:0;display:flex;flex-direction:column}.help-thread-head{display:flex;align-items:flex-start;gap:12px;padding:17px 20px;border-bottom:1px solid var(--help-border);background:var(--help-bg)}.help-thread-head>div{min-width:0;flex:1}.help-thread-head h2{overflow-wrap:anywhere;margin:4px 0 8px}.help-thread-head>.action-btn:first-child{display:none}.help-thread-head>.action-btn:last-child{font-size:11px;padding:6px 9px;min-height:34px}.help-conversation{display:flex;flex-direction:column;flex:1;min-height:0}.help-messages{flex:1;min-height:0;overflow-y:auto;padding:22px;display:flex;flex-direction:column;gap:18px;overscroll-behavior:contain;touch-action:pan-y;scrollbar-gutter:stable}.help-message{align-self:flex-start;width:fit-content;max-width:92%;background:var(--help-panel);border:1px solid var(--help-border);border-radius:3px 13px 13px;padding:13px 15px;overflow-wrap:anywhere}.help-message.own{align-self:flex-end;background:var(--help-tint);border-color:transparent;border-radius:13px 3px 13px 13px}.help-message.private{background:var(--help-note);color:var(--help-note-ink);border-color:var(--help-note-ink)}.help-message header{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;font-size:11px;margin-bottom:9px}.help-message header strong{font-size:12px}.help-message header time{color:var(--help-muted);font-size:10px}.help-message-text{white-space:pre-wrap;line-height:1.65;font-size:14px}.help-message footer{text-align:right;font-size:10px;color:var(--help-muted);margin-top:6px}.help-note-label{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;margin-bottom:8px}.help-note-label svg{width:13px;height:13px}.help-file{width:100%;display:flex;gap:10px;align-items:center;text-align:left;background:var(--help-bg);border:1px solid var(--help-border);border-radius:8px;color:var(--help-ink);padding:11px;margin-top:9px}.help-file>span{display:grid;gap:4px;min-width:0;flex:1}.help-file strong{font-size:12px;overflow-wrap:anywhere}.help-file small{font-size:11px}.help-typing{min-height:22px;padding:0 20px;color:var(--help-muted);font-size:11px}.help-composer{padding:14px 18px;border-top:1px solid var(--help-border);background:var(--help-bg)}.help-composer.private{background:var(--help-note)}.help-compose-tabs{display:flex;gap:8px;margin-bottom:10px}.help-compose-tabs button{min-height:30px;padding:5px 10px;font-size:12px;border-color:transparent;background:transparent}.help-compose-tabs button[aria-pressed="true"]{color:var(--help-purple);border-bottom:2px solid var(--help-purple);border-radius:0}.help-compose-tabs button svg{width:13px;height:13px}.aki-help textarea,.aki-help select,.aki-help input:not([type="file"]){color:var(--help-ink);background:var(--help-bg);border:1px solid var(--help-border);border-radius:8px;padding:10px 12px;width:100%;min-width:0}.aki-help textarea{resize:vertical;min-height:75px;max-height:220px;line-height:1.5}.aki-help input::placeholder,.aki-help textarea::placeholder{color:var(--help-muted);opacity:1}.help-composer-foot{display:flex;align-items:center;gap:10px;margin-top:8px}.help-composer-foot>small{font-size:10px;flex:1;line-height:1.4}.help-attach{position:relative;display:flex;align-items:center;gap:5px;cursor:pointer;color:var(--help-muted);font-size:12px;min-height:38px}.help-attach input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}.help-pending{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}.help-pending>span{display:inline-flex;align-items:center;gap:8px;padding:4px 7px;border-radius:5px;background:var(--help-soft);font-size:11px;overflow-wrap:anywhere}.help-pending button{background:transparent;border:0;color:var(--help-ink);font-size:20px;min-width:24px;min-height:24px}.help-context{border-left:1px solid var(--help-border);background:var(--help-panel);min-width:0;overflow-y:auto}.help-context summary{padding:18px 14px;font-weight:650;font-size:13px;cursor:pointer}.help-context-body{padding:0 15px 18px;display:grid;gap:14px}.help-context-body>strong{overflow-wrap:anywhere}.help-context dl{display:grid;grid-template-columns:auto 1fr;gap:8px;margin:0;font-size:11px}.help-context dt{color:var(--help-muted)}.help-context dd{margin:0;text-align:right;overflow-wrap:anywhere}.help-context label,.help-new label{display:grid;gap:7px;font-size:12px;color:var(--help-muted)}.help-context form{display:grid;gap:12px}.help-context select{font-size:12px}.help-context .action-btn{font-size:12px}.help-history{border-top:1px solid var(--help-border);font-size:11px}.help-history summary{padding:15px 0}.help-history p{line-height:1.6;margin-bottom:12px;font-size:11px}.help-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;min-height:250px;padding:30px;color:var(--help-muted)}.help-placeholder>svg{width:34px;height:34px;color:var(--help-purple)}.help-placeholder h2,.help-placeholder h3{color:var(--help-ink)}.help-placeholder p{max-width:300px;line-height:1.6;font-size:13px}.help-sync{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--help-muted)}.help-sync svg{width:13px;height:13px}.help-sync>span{margin-left:auto}.help-alert{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--help-note);color:var(--help-note-ink);border:1px solid var(--help-border);border-radius:10px;padding:12px;font-size:13px}.help-new{background:var(--help-bg);border:1px solid var(--help-border);border-radius:15px;padding:25px;max-width:760px;width:100%;margin:0 auto}.help-new header{margin-bottom:22px}.help-new h2{margin-top:5px}.help-new form{display:grid;gap:20px}.help-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}.help-new footer{display:flex;justify-content:flex-end;gap:10px}.help-hint{font-size:11px;line-height:1.6;margin-bottom:7px!important}.help-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:801px){.help-layout.customer .help-context{display:none}}
@media(max-width:1250px){.help-layout.staff{grid-template-columns:245px minmax(0,1fr)}.help-layout.staff .help-context{grid-column:2;max-height:210px;border-top:1px solid var(--help-border)}.help-layout.staff{height:auto;min-height:600px}.help-layout.staff .help-list{grid-row:1/3;max-height:800px}.help-layout.staff .help-thread{height:600px}.help-composer-foot>small{display:none}.help-composer-foot .action-btn{margin-left:auto}}
@media(max-width:800px){.help-heading{align-items:flex-start;flex-direction:column;gap:12px}.help-heading-actions{width:100%}.help-heading-actions>.action-btn:last-child{margin-left:auto}.help-heading p{font-size:13px}.aki-help{gap:13px}.help-layout,.help-layout.staff{grid-template-columns:1fr;min-height:450px;height:calc(100dvh - 330px);min-height:440px}.help-layout .help-context,.help-layout .help-thread{display:none}.help-layout.selected .help-list{display:none}.help-layout.selected .help-thread{display:flex;height:auto;min-height:0}.help-layout.selected{height:calc(100dvh - 200px);min-height:540px}.help-layout.selected .help-context{display:block;grid-column:auto;max-height:180px;border-left:0;border-top:1px solid var(--help-border)}.help-layout.selected{grid-template-rows:minmax(420px,1fr) auto}.help-layout.staff .help-list{grid-row:auto;max-height:none}.help-context details:not([open]){max-height:50px}.help-thread-head{padding:12px;gap:8px;flex-wrap:wrap}.help-thread-head>.action-btn:first-child{display:inline-flex;font-size:11px;padding:5px 8px;min-height:32px}.help-thread-head>.action-btn:first-child span{display:none}.help-thread-head h2{font-size:15px}.help-thread-head .help-eyebrow{font-size:10px}.help-messages{padding:15px;gap:14px}.help-message{max-width:95%;padding:11px 12px}.help-message-text{font-size:13px}.help-composer{padding:11px}.help-composer-foot .action-btn{font-size:12px;padding:8px 10px}.help-attach span{display:none}.help-sync{flex-wrap:wrap}.help-sync>span{font-size:10px}.help-new{padding:18px}.help-fields{grid-template-columns:1fr}.help-filters{margin:0 -2px}.help-list .help-placeholder{min-height:300px}.help-layout.selected .help-messages{min-height:120px}.help-composer textarea{min-height:64px;max-height:140px}}
@media(prefers-reduced-motion:reduce){.aki-help *{scroll-behavior:auto!important}}

/* Keep ticket rows independent of the older mail unread badge. */
.aki-help .help-ticket{height:auto;min-height:116px;align-items:stretch;place-items:normal;border-radius:0;margin:0}
@media(max-width:800px){.aki-help:has(.help-layout.selected)>.help-heading,.aki-help:has(.help-layout.selected)>.help-view-tabs,.aki-help:has(.help-layout.selected)>.help-filters,.aki-help:has(.help-layout.selected)>.help-sync{display:none}.help-layout.selected{height:calc(100dvh - 190px);min-height:450px;grid-template-rows:minmax(380px,1fr) auto}}

@media(max-width:800px){.app-main:has(.aki-help .help-layout.selected) .contextbar{display:none}.help-layout.selected{display:flex;flex-direction:column;height:calc(100dvh - 160px);min-height:440px}.help-layout.selected .help-thread{flex:1;min-height:0}.help-layout.selected .help-context{flex:0 0 auto;max-height:180px}.help-layout.selected .help-messages{min-height:0}}
.help-context details:not([open])>.help-context-body{display:none}
@media(min-width:1251px){.help-layout.staff{height:min(740px,calc(100dvh - 375px));min-height:480px}}
