.performance-ai-launcher{position:fixed;z-index:10042;right:max(24px,env(safe-area-inset-right));bottom:max(92px,calc(env(safe-area-inset-bottom) + 68px));display:grid;place-items:center;width:58px;height:58px;border:1px solid #e7c49f;border-radius:20px;background:linear-gradient(145deg,#0f4b42,#173b35 58%,#0a2e29);color:#edc39b;box-shadow:0 16px 36px #07181552,0 0 0 5px #fff8efb8;cursor:pointer;touch-action:none;transition:transform .18s ease,box-shadow .18s ease}.performance-ai-launcher:hover,.performance-ai-launcher:focus-visible{transform:translateY(-2px);box-shadow:0 18px 40px #07181566,0 0 0 6px #dfb18452}.performance-ai-launcher svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.performance-ai-launcher::after{content:"AI";position:absolute;right:-4px;top:-5px;display:grid;place-items:center;min-width:22px;height:20px;padding:0 4px;border:2px solid #f8f3eb;border-radius:8px;background:#d49a69;color:#173b35;font:950 8px/1 system-ui;letter-spacing:.04em}.performance-ai-launcher.dragging{transition:none;cursor:grabbing;transform:scale(1.04)}.performance-ai-launcher[hidden],.auth-locked .performance-ai-launcher,.auth-locked .performance-ai-panel{display:none!important}
.performance-ai-panel{position:fixed;z-index:10060;right:max(22px,env(safe-area-inset-right));bottom:max(164px,calc(env(safe-area-inset-bottom) + 140px));display:grid;grid-template-rows:auto auto 1fr auto;width:min(430px,calc(100vw - 32px));height:min(680px,calc(100dvh - 190px));overflow:hidden;border:1px solid #ddc8ae;border-radius:24px;background:#f8f4ed;box-shadow:0 28px 80px #07181566;transform:translateY(18px) scale(.97);transform-origin:bottom right;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease}.performance-ai-panel.open{transform:none;opacity:1;pointer-events:auto}.performance-ai-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 18px 15px;background:linear-gradient(132deg,#0f493f,#173b35);color:white}.performance-ai-head>div{min-width:0}.performance-ai-head .eyebrow{margin:0 0 4px;color:#e5b88e}.performance-ai-head h3{margin:0;color:white;font-size:19px}.performance-ai-head small{display:block;margin-top:4px;color:#c4d5d0;font-size:10px}.performance-ai-head-actions{display:flex;gap:7px}.performance-ai-head button{display:grid;place-items:center;width:38px;height:38px;border:1px solid #ffffff2b;border-radius:12px;background:#ffffff12;color:white;font-size:18px;cursor:pointer}.performance-ai-security{display:flex;align-items:center;gap:9px;padding:10px 15px;border-bottom:1px solid #e3d8ca;background:#fffaf4;color:#5d706a;font-size:9px;line-height:1.4}.performance-ai-security svg{flex:0 0 18px;width:18px;height:18px;fill:none;stroke:#18705f;stroke-width:1.8}.performance-ai-status{margin-left:auto;white-space:nowrap;border-radius:999px;padding:5px 8px;background:#e3f3ea;color:#176250;font-weight:900}.performance-ai-status.offline{background:#f4e8d9;color:#94623f}
.performance-ai-body{overflow:auto;padding:15px 15px 4px;scroll-behavior:smooth}.performance-ai-welcome{padding:14px;border:1px solid #eadbca;border-radius:16px;background:#fffdfa}.performance-ai-welcome strong{display:block;color:#173b35;font-size:13px}.performance-ai-welcome p{margin:7px 0 0;color:#65736f;font-size:10px;line-height:1.55}.performance-ai-quick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:11px 0}.performance-ai-quick button{min-height:43px;border:1px solid #dfc7ad;border-radius:12px;background:#fffaf4;color:#684d38;font-size:9px;font-weight:900;cursor:pointer}.performance-ai-quick button:hover{background:#f2e4d5}.performance-ai-message{max-width:88%;margin:9px 0;padding:10px 12px;border-radius:14px 14px 14px 4px;background:white;color:#31443f;box-shadow:0 4px 14px #173b350c;font-size:10px;line-height:1.55;white-space:pre-wrap}.performance-ai-message.user{margin-left:auto;border-radius:14px 14px 4px 14px;background:#173b35;color:white}.performance-ai-message.error{border:1px solid #e7b7a8;background:#fff2ed;color:#8c3d2c}.performance-ai-message.thinking{color:#6c7b77;font-style:italic}.performance-ai-message time{display:block;margin-top:5px;color:#9aaaa5;font-size:7px}
.performance-ai-preview{margin:11px 0;padding:14px;border:1px solid #d7b58e;border-left:4px solid #c58957;border-radius:15px;background:#fffaf3}.performance-ai-preview .eyebrow{margin:0;color:#9b6846}.performance-ai-preview h4{margin:4px 0 8px;color:#173b35;font-size:13px}.performance-ai-preview dl{display:grid;grid-template-columns:auto 1fr;gap:5px 10px;margin:0;font-size:9px}.performance-ai-preview dt{color:#7b8985;font-weight:800}.performance-ai-preview dd{margin:0;color:#263c36;font-weight:750}.performance-ai-preview p{margin:9px 0 0;color:#786c60;font-size:9px;line-height:1.45}.performance-ai-preview-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.performance-ai-preview-actions button{min-height:38px;border:1px solid #d9c3aa;border-radius:10px;padding:8px 11px;background:white;color:#59483a;font-size:9px;font-weight:900;cursor:pointer}.performance-ai-preview-actions .confirm{border-color:#173b35;background:#173b35;color:white}.performance-ai-results{margin-top:9px;padding:10px;border-radius:12px;background:#edf4f1}.performance-ai-results a,.performance-ai-results button{display:block;width:100%;border:0;border-bottom:1px solid #d6e3df;padding:8px 3px;background:transparent;color:#17594e;text-align:left;font-size:9px;font-weight:800;cursor:pointer}.performance-ai-results a:last-child,.performance-ai-results button:last-child{border-bottom:0}.performance-ai-undo{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0;padding:10px 12px;border:1px solid #c9ddd6;border-radius:13px;background:#eaf4f0;color:#275248;font-size:9px}.performance-ai-undo button{min-height:36px;border:1px solid #7eaa9d;border-radius:9px;background:white;color:#174b42;font-weight:900;cursor:pointer}
.performance-ai-form{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 14px max(14px,env(safe-area-inset-bottom));border-top:1px solid #dfd3c6;background:#fffdfa}.performance-ai-form textarea{min-height:48px;max-height:112px;resize:none;border:1px solid #dac6af;border-radius:13px;padding:11px 12px;background:white;color:#213a34;font:500 11px/1.4 system-ui}.performance-ai-form textarea:focus{outline:2px solid #c58b5b55;border-color:#b77a4b}.performance-ai-form button{align-self:end;min-width:50px;height:48px;border:0;border-radius:13px;background:#c58b5b;color:#173b35;font-size:18px;font-weight:950;cursor:pointer}.performance-ai-form button:disabled{opacity:.5;cursor:wait}
@media(max-width:700px){.performance-ai-launcher{right:max(14px,env(safe-area-inset-right));bottom:max(82px,calc(env(safe-area-inset-bottom) + 68px));width:54px;height:54px;border-radius:18px}.performance-ai-panel{right:0;bottom:0;width:100vw;height:min(82dvh,720px);border-width:1px 0 0;border-radius:23px 23px 0 0;transform:translateY(100%);transform-origin:bottom center}.performance-ai-panel.open{transform:none}.performance-ai-head{padding-top:16px;padding-right:max(15px,calc(env(safe-area-inset-right) + 10px));padding-left:max(15px,calc(env(safe-area-inset-left) + 10px))}.performance-ai-body{padding-right:max(14px,calc(env(safe-area-inset-right) + 10px));padding-left:max(14px,calc(env(safe-area-inset-left) + 10px))}.performance-ai-quick{grid-template-columns:1fr 1fr}.performance-ai-form{padding-right:max(14px,calc(env(safe-area-inset-right) + 10px));padding-left:max(14px,calc(env(safe-area-inset-left) + 10px))}}
@media(prefers-reduced-motion:reduce){.performance-ai-launcher,.performance-ai-panel{transition:none}}
