
/* Warehouse AI Copilot + production diagnostics */
.ai-copilot-backdrop{position:fixed;inset:0;background:rgba(25,12,22,.32);backdrop-filter:blur(5px);opacity:0;pointer-events:none;transition:.22s ease;z-index:4600}
.ai-copilot-backdrop.open{opacity:1;pointer-events:auto}.ai-copilot-panel{position:fixed;inset-block:18px;inset-inline-end:18px;width:min(520px,calc(100vw - 36px));display:flex;flex-direction:column;min-height:0;background:var(--surface,#fff);border:1px solid rgba(117,26,77,.16);border-radius:28px;box-shadow:0 28px 80px rgba(45,14,34,.24);transform:translateX(calc(100% + 40px));opacity:0;pointer-events:none;transition:.28s cubic-bezier(.2,.8,.2,1);z-index:4610;overflow:hidden}
[dir="rtl"] .ai-copilot-panel{inset-inline-end:18px}.ai-copilot-panel.open{transform:translateX(0);opacity:1;pointer-events:auto}.ai-copilot-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 20px 16px;border-bottom:1px solid rgba(117,26,77,.1);background:linear-gradient(135deg,rgba(117,26,77,.07),rgba(22,163,151,.06))}.ai-copilot-brand{display:flex;align-items:center;gap:13px;min-width:0}.ai-copilot-brand h2{margin:2px 0 3px;font-size:22px;line-height:1.15}.ai-copilot-brand small,.ai-copilot-brand>div>span{display:block;color:var(--muted,#75666f);line-height:1.55}.ai-copilot-orb{width:48px;height:48px;flex:0 0 48px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#7b164f,#18a694);color:#fff;box-shadow:0 10px 24px rgba(117,26,77,.18)}.ai-copilot-orb .ui-icon{width:24px;height:24px}.ai-copilot-head-actions{display:flex;align-items:center;gap:8px}.ai-status-pill{display:flex;align-items:center;gap:7px;padding:8px 10px;border-radius:999px;background:rgba(117,26,77,.06);font-size:12px;white-space:nowrap}.ai-status-pill i{width:8px;height:8px;border-radius:50%;background:#c59b24}.ai-status-pill[data-state="ready"] i{background:#16967f}.ai-status-pill[data-state="error"] i{background:#c84a55}.ai-copilot-suggestions{display:flex;gap:8px;overflow-x:auto;padding:12px 16px;border-bottom:1px solid rgba(117,26,77,.08);scrollbar-width:none}.ai-copilot-suggestions::-webkit-scrollbar{display:none}.ai-copilot-suggestions button{flex:0 0 auto;border:1px solid rgba(117,26,77,.13);background:#fff;border-radius:999px;padding:9px 12px;color:#4a3542;font:inherit;font-size:12px;cursor:pointer}.ai-chat-stream{flex:1 1 auto;min-height:0;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px;overscroll-behavior:contain}.ai-message{display:flex;gap:10px;align-items:flex-start}.ai-message-avatar{width:32px;height:32px;flex:0 0 32px;border-radius:11px;display:grid;place-items:center;background:rgba(117,26,77,.09);color:#7b164f}.ai-message-avatar .ui-icon{width:17px;height:17px}.ai-message>div{max-width:84%;padding:12px 14px;border-radius:16px;background:#f7f3f5;border:1px solid rgba(117,26,77,.08)}.ai-message.user{justify-content:flex-end}.ai-message.user>div{background:#7b164f;color:#fff;border-color:#7b164f}.ai-message p{margin:0;white-space:pre-wrap;line-height:1.75}.ai-message strong{display:block;margin-bottom:5px}.ai-message.is-thinking>div{opacity:.72}.ai-composer{flex:0 0 auto;border-top:1px solid rgba(117,26,77,.1);padding:14px;background:#fff}.ai-composer textarea{width:100%;min-height:64px;max-height:140px;resize:vertical;border:1px solid rgba(117,26,77,.16);border-radius:15px;padding:12px 13px;font:inherit;background:#fff;color:inherit;outline:none}.ai-composer textarea:focus{border-color:rgba(117,26,77,.48);box-shadow:0 0 0 3px rgba(117,26,77,.07)}.ai-composer-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}.ai-composer-foot>span{font-size:11px;color:var(--muted,#75666f)}.ai-composer-foot>div{display:flex;gap:8px}.header-ai-action{position:relative}.ai-live-dot{position:absolute;inset-block-end:5px;inset-inline-end:5px;width:7px;height:7px;border-radius:50%;background:#c59b24;border:2px solid rgba(255,255,255,.9)}.header-ai-action[data-state="ready"] .ai-live-dot{background:#25ad88}.home-ai-quick{background:linear-gradient(135deg,rgba(117,26,77,.055),rgba(22,163,151,.06))}.home-ai-quick>em{font-size:10px;padding:5px 7px;border-radius:999px;background:rgba(22,163,151,.11);color:#117a6d;font-style:normal}.production-diagnostics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.production-diagnostics-grid>div{padding:13px;border:1px solid rgba(117,26,77,.1);border-radius:14px;background:rgba(117,26,77,.025)}.production-diagnostics-grid span{display:block;font-size:12px;color:var(--muted,#75666f);margin-bottom:5px}.production-technical-details{margin:12px 0;border:1px solid rgba(117,26,77,.1);border-radius:14px;padding:10px 12px}.production-technical-details summary{cursor:pointer;font-weight:700}.production-technical-details pre{white-space:pre-wrap;word-break:break-word;font-size:11px;line-height:1.6;direction:ltr;text-align:left;max-height:240px;overflow:auto}.production-service-card .whatsapp-setup-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.production-service-card .whatsapp-setup-head{display:flex;align-items:center;gap:10px}.production-service-card .whatsapp-gateway-dot{margin-inline-start:auto;width:9px;height:9px;border-radius:50%;background:#c59b24}.production-service-card .whatsapp-gateway-dot[data-state="ready"]{background:#16967f}.production-service-card .whatsapp-gateway-dot[data-state="error"]{background:#c84a55}
@media(max-width:700px){.ai-copilot-panel{inset-block:8px;inset-inline:8px;width:auto;max-width:none;border-radius:22px;transform:translateY(16px) scale(.985)}.ai-copilot-panel.open{transform:none}.ai-copilot-head{padding:15px}.ai-status-pill{display:none}.ai-message>div{max-width:90%}.ai-composer-foot{align-items:flex-end}.ai-composer-foot>span{max-width:45%}.production-diagnostics-grid{grid-template-columns:1fr}.header-ai-action{display:grid}}


/* v21.17.0 Warehouse AI — approved chat visual system */
.ai-copilot-panel{width:min(650px,calc(100vw - 24px));max-width:650px;height:min(850px,calc(100vh - 28px));inset-block:14px;inset-inline-end:14px;border:1px solid rgba(137,58,101,.16);border-radius:32px;background:#fff;box-shadow:0 32px 80px rgba(43,20,35,.24);overflow:hidden;display:flex;flex-direction:column}
.ai-copilot-head{flex:0 0 auto;padding:24px 25px 20px;border-bottom:1px solid #eee4ea;background:radial-gradient(circle at 12% 10%,rgba(236,72,153,.10),transparent 25%),radial-gradient(circle at 92% 18%,rgba(20,184,166,.09),transparent 24%),linear-gradient(145deg,#fff,#fffafd)}
.ai-copilot-brand{display:flex;align-items:center;gap:16px;min-width:0}
.ai-copilot-orb{width:68px;height:68px;flex:0 0 68px;border-radius:20px;background:linear-gradient(145deg,#a51167,#7a205a 55%,#159f9b);display:grid;place-items:center;color:#fff;box-shadow:0 12px 26px rgba(151,20,91,.20)}
.ai-copilot-orb svg{width:30px;height:30px;stroke-width:1.8}
.ai-copilot-brand>div{display:grid;gap:2px;min-width:0}
.ai-copilot-brand [data-i18n="aiEyebrow"]{font-size:13px;color:#8d7d87;font-weight:700}
.ai-copilot-brand h2{margin:0;color:#2c1b27;font-size:30px;line-height:1.15;letter-spacing:-.025em}
.ai-copilot-brand small{margin-top:5px;color:#7b6f78;font-size:13px;line-height:1.6}
.ai-copilot-head-actions{display:flex;align-items:center;gap:10px}
.ai-status-pill{min-height:38px;padding:7px 13px;border-radius:999px;border:1px solid #d9eee9;background:#effaf7;color:#137d6f;display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:900}
.ai-status-pill i{width:9px;height:9px;border-radius:50%;background:#18a88f;box-shadow:0 0 0 4px rgba(24,168,143,.10)}
.ai-status-pill[data-state="checking"]{background:#f7f3f6;border-color:#eae0e6;color:#756873}.ai-status-pill[data-state="checking"] i{background:#9a8c95}
.ai-status-pill[data-state="error"]{background:#fff3f5;border-color:#f3d9df;color:#b64057}.ai-status-pill[data-state="error"] i{background:#da526a}
.ai-copilot-head .close-btn{width:46px;height:46px;border-radius:15px;background:#fff;border:1px solid #eadfe6;color:#685762;font-size:18px}
.ai-copilot-suggestions{flex:0 0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:14px 18px;border-bottom:1px solid #f0e7ec;background:#fff}
.ai-copilot-suggestions button{min-width:0;min-height:72px;padding:10px 9px;border:1px solid #eadfe6;border-radius:18px;background:linear-gradient(145deg,#fff,#fffafd);color:#47343f;font:inherit;font-size:11px;font-weight:800;display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:7px;text-align:start;box-shadow:0 7px 18px rgba(54,29,45,.035);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.ai-copilot-suggestions button:hover{transform:translateY(-1px);border-color:#e3c5d4;box-shadow:0 10px 22px rgba(54,29,45,.07)}
.ai-suggestion-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#fff0f7;color:#c71770}
.ai-copilot-suggestions button:nth-child(2) .ai-suggestion-icon{background:#ecfbf8;color:#099d89}.ai-copilot-suggestions button:nth-child(3) .ai-suggestion-icon{background:#edf6ff;color:#2772b3}.ai-copilot-suggestions button:nth-child(4) .ai-suggestion-icon{background:#f5f0ff;color:#704bbf}
.ai-suggestion-icon svg{width:17px;height:17px;stroke-width:1.9}
.ai-chat-stream{flex:1 1 auto;min-height:0;padding:22px 20px;overflow-y:auto;background:linear-gradient(180deg,#fff 0%,#fffcfe 100%);scrollbar-width:thin;scrollbar-color:#b9afb5 transparent}
.ai-message{display:flex;align-items:flex-end;gap:10px;margin:0 0 16px;max-width:92%}
.ai-message>div{min-width:0;padding:14px 16px;border:1px solid #eadfe6;border-radius:20px;background:#faf7f9;color:#392a34;box-shadow:0 5px 16px rgba(58,31,47,.035)}
.ai-message p{margin:0;white-space:pre-wrap;line-height:1.75;font-size:14px}
.ai-message strong{display:block;margin-bottom:4px;color:#31202b;font-size:14px}
.ai-message-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:12px;display:grid;place-items:center;background:#fff0f7;color:#bd146a;border:1px solid #f0d9e5}
.ai-message-avatar svg{width:19px;height:19px;stroke-width:1.9}
.ai-message.assistant{margin-inline-end:auto;flex-direction:row}.ai-message.assistant>div{border-start-end-radius:8px}
.ai-message.user{margin-inline-start:auto;flex-direction:row-reverse}.ai-message.user>div{background:linear-gradient(145deg,#931253,#7b1547);border-color:#8c174f;color:#fff;border-start-start-radius:8px;box-shadow:0 10px 22px rgba(126,20,72,.14)}.ai-message.user p{color:#fff}.ai-message.user .ai-message-avatar{background:linear-gradient(145deg,#ba176d,#981052);color:#fff;border-color:rgba(255,255,255,.15)}
.ai-message.is-thinking>div{opacity:.72}
.ai-composer{flex:0 0 auto;padding:16px 18px 18px;border-top:1px solid #eee4ea;background:#fff}
.ai-composer textarea{width:100%;min-height:82px;max-height:150px;padding:17px 18px;border:1px solid #e8d9e1;border-radius:20px;background:#fff;color:#31232c;font:inherit;font-size:14px;line-height:1.6;resize:none;outline:none;box-shadow:inset 0 1px 2px rgba(45,25,37,.025)}
.ai-composer textarea:focus{border-color:#c86a9b;box-shadow:0 0 0 4px rgba(197,38,121,.07)}
.ai-composer-foot{margin-top:11px;display:flex;align-items:center;justify-content:flex-end;gap:10px}
.ai-composer-foot .btn{min-height:44px;border-radius:14px;padding:9px 18px;font-weight:900}
.ai-composer-foot .ai-send-btn{background:linear-gradient(145deg,#b8176b,#8d1453);border-color:#a51461;color:#fff}.ai-composer-foot .ai-clear-btn{background:#fff;color:#43323d;border-color:#e7dae2}
@media(max-width:760px){.ai-copilot-panel{inset:0;width:100vw;max-width:none;height:100dvh;border-radius:0}.ai-copilot-head{padding:18px 16px 16px}.ai-copilot-orb{width:54px;height:54px;flex-basis:54px;border-radius:16px}.ai-copilot-brand h2{font-size:23px}.ai-copilot-brand small{font-size:11px}.ai-copilot-head-actions{position:absolute;inset-inline-start:14px;top:16px}.ai-status-pill{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-copilot-suggestions{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.ai-copilot-suggestions button{min-height:58px}.ai-chat-stream{padding:16px 12px}.ai-message{max-width:96%}.ai-composer{padding:12px}.ai-composer textarea{min-height:72px}}

/* v21.17.0 mobile fit lock: no off-canvas interpolation on full-screen AI. */
@media(max-width:760px){.ai-copilot-panel{transition:none;transform:none}.ai-copilot-panel.open{transform:none}}
.ai-copilot-head .close-btn{font-size:0}
