.ai-help{position:fixed;right:24px;bottom:24px;z-index:850;font-family:inherit;color:var(--ui-text,var(--text,#202326));font-size:13px}
.ai-help [hidden]{display:none!important}.ai-help button,.ai-help textarea{font:inherit}.ai-help button{cursor:pointer}
.ai-help-launch{height:42px;border:1px solid rgba(17,19,22,.12);border-radius:12px;padding:0 16px;background:#17191c;color:#fff;box-shadow:0 7px 24px rgba(17,19,22,.16);font-size:11px;font-weight:850;letter-spacing:-.01em}
.ai-help-launch:hover{background:#26292d}.ai-help-panel{position:absolute;right:0;bottom:54px;width:min(420px,calc(100vw - 32px));height:min(610px,calc(100dvh - 108px));display:flex;flex-direction:column;background:var(--ui-surface,var(--surface,#fff));border:1px solid var(--ui-line,var(--line,#dedfe1));border-radius:14px;box-shadow:0 18px 48px rgba(17,19,22,.18);overflow:hidden}
.ai-help-header{display:flex;align-items:center;justify-content:space-between;padding:15px 16px 13px;border-bottom:1px solid var(--ui-line,var(--line,#dedfe1));flex-shrink:0;background:var(--ui-surface,var(--surface,#fff))}
.ai-help-header strong{font-size:13px;font-weight:900;letter-spacing:-.02em}.ai-help-header small{display:block;color:var(--ui-muted,var(--muted,#72767c));margin-top:3px;font-size:9px}
.ai-help-close{border:0;background:transparent;color:inherit;font-size:22px!important;line-height:1;width:30px;height:30px;border-radius:8px}.ai-help-close:hover{background:var(--ui-surface-3,#f0f1f2)}
.ai-help-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--ui-bg,#f6f7f8)}
.ai-help-message{overflow-wrap:anywhere;line-height:1.62;padding:11px 12px;border-radius:11px;max-width:100%;flex-shrink:0;font-size:11px}
.ai-help-assistant{align-self:flex-start;background:var(--ui-surface,#fff);border:1px solid var(--ui-line,#dedfe1)}.ai-help-user{align-self:flex-end;background:#17191c;color:#fff;max-width:88%}.ai-help-intro{color:var(--ui-muted,#6f767e)}
.ai-help-answer-line{margin:0 0 7px}.ai-help-answer-line:last-child{margin-bottom:0}.ai-help-answer-line strong{font-weight:850;color:var(--ui-text,#17191c)}
.ai-help-answer-list{margin:2px 0 8px;padding:0 0 0 17px;display:grid;gap:4px}.ai-help-answer-list:last-child{margin-bottom:0}.ai-help-answer-list li{padding-left:1px}
.ai-help-form{padding:11px 12px 12px;border-top:1px solid var(--ui-line,var(--line,#dedfe1));flex-shrink:0;background:var(--ui-surface,#fff)}
.ai-help-label{display:block;font-size:9px;font-weight:800;margin:0 0 5px 1px;color:var(--ui-muted,var(--muted,#72767c))}.ai-help-input-row{display:flex;gap:7px;align-items:stretch}
.ai-help-input-row textarea{min-width:0;flex:1;resize:none;line-height:1.5;padding:9px 10px;border:1px solid var(--ui-line-strong,var(--line,#dedfe1));border-radius:9px;color:inherit;background:var(--ui-surface-2,var(--surface,#fff));height:62px;font-size:10.5px}
.ai-help-input-row button{border:0;border-radius:9px;background:#17191c;color:#fff;padding:8px 13px;flex-shrink:0;font-size:10px;font-weight:850}.ai-help button:disabled{opacity:.5;cursor:wait}
.ai-help button:focus-visible,.ai-help textarea:focus-visible{outline:2px solid #2457d6;outline-offset:2px}.ai-help-form>small{display:block;font-size:8.5px;line-height:1.5;margin-top:6px;color:var(--ui-muted,var(--muted,#72767c))}
.ai-help-sources{display:flex;flex-direction:column;gap:5px;border-top:1px solid var(--ui-line,var(--line,#dedfe1));padding-top:8px;margin-top:9px;align-items:flex-start}.ai-help-sources>span{font-size:9px;font-weight:800;color:var(--ui-muted,var(--muted,#72767c))}
.ai-help-source-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;width:100%}.ai-help-source-list>li{display:block;margin:0;padding:0}.ai-help-source-list>li>button{display:block;width:100%;background:var(--ui-surface-2,var(--surface,#fff));border:1px solid var(--ui-line,var(--line,#dedfe1));border-radius:7px;font-size:9.5px;padding:6px 8px;color:inherit;text-align:left;text-decoration:none}.ai-help-source-list>li>button:hover{background:var(--ui-surface-3,#f0f1f2)}
.ai-help-notice{border-style:dashed}
/* ADMIN screen follows the same write-page / form system used by the rest of ERP. */
.ai-help-admin{max-width:none}.ai-help-admin-top-actions{justify-content:flex-end;margin-top:9px!important}.ai-help-admin-form{max-width:980px;margin:0 auto}.ai-help-admin-card{padding:13px!important}.ai-help-admin-card .write-section-title{margin-bottom:5px!important}.ai-help-state-badge{display:inline-flex!important;width:auto!important;margin:0!important;padding:4px 8px!important;font-weight:850!important;line-height:1!important}.ai-help-admin-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ai-help-admin-grid .span4{grid-column:1 / -1!important}.ai-help-admin-choices{display:flex;flex-wrap:wrap;gap:7px 14px;min-height:var(--ui-field-h);align-items:center;padding:8px 10px;border:1px solid var(--ui-line-strong);border-radius:var(--ui-control-r);background:var(--ui-surface-2)}.ai-help-job-choice{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:700;cursor:pointer}.ai-help-job-choice input{width:15px!important;min-width:15px!important;height:15px!important;min-height:15px!important;margin:0!important;accent-color:#202225!important}.ai-help-field-help{display:block;margin:5px 1px 0;color:var(--ui-muted);font-size:8.5px;line-height:1.45}.ai-help-optional{font-weight:600;color:var(--ui-muted)}.ai-help-admin-note{margin-top:8px!important}.ai-help-admin-meta{margin-top:8px;color:var(--ui-muted);font-size:8.5px}.ai-help-admin-actions{justify-content:flex-end;margin-top:10px!important}.ai-help-admin-actions .write-action{min-width:88px}.ai-help-admin-error{min-height:18px;margin:7px 0 0;color:#a0443e;font-size:9px}.ai-help-admin [hidden]{display:none!important}
html[data-erp-theme="dark"] .ai-help-launch,html[data-erp-theme="dark"] .ai-help-input-row button{background:#f2f3f4;color:#111315}html[data-erp-theme="dark"] .ai-help-user{background:#f2f3f4;color:#111315}html[data-erp-theme="dark"] .ai-help-job-choice input{accent-color:#e7e9ec!important}
@media(max-width:900px){.ai-help-admin-form{max-width:none}.ai-help-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ai-help-admin-grid .span2{grid-column:span 1!important}.ai-help-admin-grid .span4{grid-column:1/-1!important}}
@media(max-width:600px){.ai-help{right:12px;bottom:12px}.ai-help-panel{width:calc(100vw - 24px);height:min(560px,calc(100dvh - 90px));bottom:50px}.ai-help-admin-grid{grid-template-columns:1fr!important}.ai-help-admin-grid .span2,.ai-help-admin-grid .span4{grid-column:1!important}.ai-help-admin .write-banner{align-items:flex-start!important;flex-direction:column!important}.ai-help-admin .write-banner span{white-space:normal!important}.ai-help-admin-actions{justify-content:stretch}.ai-help-admin-actions button{width:100%}}
