:root{--xat-gold:#d9b44a;--xat-gold-light:#f4dc8c;--xat-blue:#173d8f;--xat-navy:#0f1d3b;--xat-card:#fff;--xat-bg:#f4f7fc;--xat-text:#17213b;--xat-muted:#667085;--xat-border:#e3e8f2;--xat-shadow:0 24px 70px rgba(13,31,69,.24)}
html[data-theme="dark"],body.dark-mode{--xat-card:#131d33;--xat-bg:#0b1222;--xat-text:#f3f6fc;--xat-muted:#aeb8cc;--xat-border:#283651;--xat-shadow:0 24px 70px rgba(0,0,0,.5)}
.xat-chat,.xat-chat *{box-sizing:border-box}
.xat-chat{font-family:"Sora",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--xat-text);line-height:1.45}
.xat-chat[hidden],.xat-chat [hidden]{display:none!important}
.xat-chat__launcher{position:fixed;right:22px;bottom:86px;z-index:999980;width:60px;height:60px;border:0;border-radius:20px;background:linear-gradient(145deg,var(--xat-gold-light),var(--xat-gold));color:var(--xat-navy);box-shadow:0 14px 34px rgba(15,29,59,.3);cursor:pointer;display:grid;place-items:center;transition:transform .2s ease,box-shadow .2s ease}
.xat-chat__launcher:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(15,29,59,.38)}
.xat-chat__launcher-icon,.xat-chat__avatar,.xat-chat__welcome-avatar{font-weight:900;letter-spacing:-.08em}
.xat-chat__launcher-icon{font-size:25px}
.xat-chat__launcher-pulse{position:absolute;right:5px;top:5px;width:12px;height:12px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.xat-chat__panel{background:var(--xat-card);border:1px solid var(--xat-border);overflow:hidden;display:flex;flex-direction:column}
.xat-chat--floating .xat-chat__panel{position:fixed;right:22px;bottom:158px;z-index:999979;width:min(410px,calc(100vw - 28px));height:min(680px,calc(100vh - 190px));border-radius:24px;box-shadow:var(--xat-shadow);transform-origin:bottom right;animation:xat-in .2s ease}
.xat-chat--inline{width:100%;max-width:980px;margin:0 auto;padding:14px}
.xat-chat--inline .xat-chat__panel{height:min(780px,calc(100dvh - 120px));min-height:560px;border-radius:24px;box-shadow:0 16px 50px rgba(13,31,69,.12)}
.xat-chat__header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;background:linear-gradient(135deg,var(--xat-navy),#173d77);color:#fff}
.xat-chat__brand{display:flex;align-items:center;gap:11px;min-width:0}
.xat-chat__brand>span:last-child{display:flex;flex-direction:column;min-width:0}
.xat-chat__brand strong{font-size:16px;letter-spacing:-.02em}
.xat-chat__brand small{font-size:11.5px;color:rgba(255,255,255,.72);display:flex;align-items:center;gap:5px}
.xat-chat__brand small i{width:7px;height:7px;background:#22c55e;border-radius:50%;box-shadow:0 0 0 3px rgba(34,197,94,.16)}
.xat-chat__avatar,.xat-chat__welcome-avatar{width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,var(--xat-gold-light),var(--xat-gold));color:var(--xat-navy);display:grid;place-items:center;font-size:20px;flex:0 0 auto}
.xat-chat__header-actions{display:flex;align-items:center;gap:6px}
.xat-chat__icon-btn{width:34px;height:34px;border:0;border-radius:10px;background:rgba(255,255,255,.1);color:#fff;font-size:22px;cursor:pointer;display:grid;place-items:center;padding:0;transition:background .15s}
.xat-chat__icon-btn:hover{background:rgba(255,255,255,.2)}
.xat-chat__new{font-size:19px}
.xat-chat__messages{flex:1;overflow:auto;overscroll-behavior:contain;padding:20px;background:linear-gradient(180deg,var(--xat-bg),var(--xat-card));scrollbar-width:thin;scrollbar-color:var(--xat-border) transparent}
.xat-chat__welcome{text-align:center;max-width:330px;margin:26px auto 10px}
.xat-chat__welcome-avatar{margin:0 auto 14px;width:54px;height:54px;border-radius:18px;font-size:25px;box-shadow:0 10px 24px rgba(217,180,74,.25)}
.xat-chat__welcome h2{font-size:22px;margin:0 0 7px;letter-spacing:-.03em}
.xat-chat__welcome p{font-size:13.5px;color:var(--xat-muted);margin:0 0 20px}
.xat-chat__quick-prompts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.xat-chat__quick-prompts button{border:1px solid var(--xat-border);background:var(--xat-card);color:var(--xat-text);border-radius:13px;padding:11px 9px;font:600 12px/1.3 inherit;cursor:pointer;transition:border-color .15s,transform .15s,background .15s}
.xat-chat__quick-prompts button:hover{border-color:var(--xat-gold);transform:translateY(-1px);background:rgba(217,180,74,.08)}
.xat-chat__message{display:flex;align-items:flex-end;gap:8px;margin:0 0 15px;animation:xat-message .18s ease}
.xat-chat__message--user{flex-direction:row-reverse}
.xat-chat__message-avatar{width:29px;height:29px;border-radius:10px;background:var(--xat-navy);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:800;flex:0 0 auto}
.xat-chat__message--user .xat-chat__message-avatar{background:var(--xat-gold);color:var(--xat-navy);font-size:8px}
.xat-chat__bubble{max-width:84%;background:var(--xat-card);border:1px solid var(--xat-border);border-radius:17px 17px 17px 5px;padding:12px 14px;box-shadow:0 4px 14px rgba(13,31,69,.06);overflow-wrap:anywhere}
.xat-chat__message--user .xat-chat__bubble{background:linear-gradient(135deg,var(--xat-blue),#2454ae);border-color:transparent;color:#fff;border-radius:17px 17px 5px 17px}
.xat-chat__bubble p{font-size:13.5px;white-space:pre-line;margin:0 0 8px}
.xat-chat__bubble p:last-child{margin-bottom:0}
.xat-chat__diagnosis{margin-top:11px;padding:10px 11px;border-left:3px solid var(--xat-gold);background:rgba(217,180,74,.09);border-radius:8px}
.xat-chat__diagnosis strong,.xat-chat__steps-title{display:block;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--xat-muted);margin-bottom:4px}
.xat-chat__diagnosis p{font-size:12.5px;margin:0}
.xat-chat__steps-title{margin-top:12px}
.xat-chat__steps{font-size:12.8px;margin:5px 0 0;padding-left:20px}
.xat-chat__steps li{margin-bottom:6px;padding-left:2px}
.xat-chat__action{border-top:1px solid var(--xat-border);margin-top:12px;padding-top:11px}
.xat-chat__action p{font-size:12px;color:var(--xat-muted);margin:0 0 8px}
.xat-chat__action small{display:block;color:var(--xat-muted);font-size:10.5px;margin-top:6px}
.xat-chat__action-btn{border:0;border-radius:10px;background:var(--xat-gold);color:var(--xat-navy);padding:9px 12px;font:700 12px inherit;cursor:pointer}
.xat-chat__action-btn--repair{background:var(--xat-blue);color:#fff}
.xat-chat__action-btn--task{background:linear-gradient(135deg,var(--xat-gold),#f1cc62);color:var(--xat-navy)}
.xat-chat__action-btn.is-complete{background:#16a34a;color:#fff}
.xat-chat__products{display:grid;gap:8px;margin-top:12px}
.xat-chat__product{display:grid;grid-template-columns:62px 1fr;gap:10px;padding:8px;border:1px solid var(--xat-border);border-radius:12px;background:var(--xat-bg)}
.xat-chat__product-image{display:block;width:62px;height:62px;border-radius:9px;overflow:hidden;background:var(--xat-card)}
.xat-chat__product-image img{width:100%;height:100%;display:block;object-fit:cover}
.xat-chat__product-info{display:flex;flex-direction:column;min-width:0;justify-content:center}
.xat-chat__product-title{font-size:12px;font-weight:800;color:var(--xat-text);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.xat-chat__product-price{font-size:12px;color:var(--xat-blue);margin-top:2px}
html[data-theme="dark"] .xat-chat__product-price,body.dark-mode .xat-chat__product-price{color:var(--xat-gold-light)}
.xat-chat__product-info small{font-size:9.5px;color:var(--xat-muted);margin-top:2px}
.xat-chat__result-link{display:inline-flex;margin-top:10px;border-radius:10px;background:var(--xat-blue);color:#fff!important;text-decoration:none;padding:9px 12px;font-size:12px;font-weight:750}
.xat-chat__feedback{display:flex;align-items:center;gap:5px;margin-top:11px;color:var(--xat-muted);font-size:10.5px}
.xat-chat__feedback button{border:1px solid var(--xat-border);background:transparent;color:var(--xat-muted);border-radius:999px;font:600 10px inherit;padding:4px 8px;cursor:pointer}
.xat-chat__feedback button.is-selected{border-color:var(--xat-gold);color:var(--xat-gold)}
.xat-chat__typing{display:flex;align-items:center;gap:4px;padding:9px 20px;color:var(--xat-muted);background:var(--xat-card)}
.xat-chat__typing span{width:6px;height:6px;border-radius:50%;background:var(--xat-gold);animation:xat-dot 1.1s infinite ease-in-out}
.xat-chat__typing span:nth-child(2){animation-delay:.14s}.xat-chat__typing span:nth-child(3){animation-delay:.28s}
.xat-chat__typing em{font-style:normal;font-size:11px;margin-left:5px}
.xat-chat__composer{display:flex;align-items:flex-end;gap:9px;padding:11px 13px 8px;background:var(--xat-card);border-top:1px solid var(--xat-border)}
.xat-chat__composer textarea{flex:1;resize:none;max-height:128px;min-height:44px;border:1px solid var(--xat-border);background:var(--xat-bg);color:var(--xat-text);border-radius:14px;padding:11px 13px;font:13.5px/1.5 inherit;outline:none;transition:border-color .15s,box-shadow .15s}
.xat-chat__composer textarea:focus{border-color:var(--xat-gold);box-shadow:0 0 0 3px rgba(217,180,74,.14)}
.xat-chat__composer textarea::placeholder{color:var(--xat-muted)}
.xat-chat__send{width:44px;height:44px;flex:0 0 auto;border:0;border-radius:14px;background:linear-gradient(145deg,var(--xat-gold-light),var(--xat-gold));color:var(--xat-navy);display:grid;place-items:center;cursor:pointer}
.xat-chat__send:disabled{opacity:.5;cursor:wait}
.xat-chat__send svg{width:19px;height:19px;fill:currentColor}
.xat-chat__notice{font-size:9.5px;text-align:center;color:var(--xat-muted);margin:0;padding:0 12px 9px;background:var(--xat-card)}
@keyframes xat-in{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes xat-message{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes xat-dot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
@media(max-width:600px){
  .xat-chat__launcher{right:14px;bottom:82px;width:56px;height:56px;border-radius:18px}
  .xat-chat--floating .xat-chat__panel{inset:0;z-index:1000000;width:100%;height:100dvh;max-height:none;border:0;border-radius:0}
  body.xat-chat-open{overflow:hidden}
  .xat-chat--inline{padding:0}.xat-chat--inline .xat-chat__panel{height:calc(100dvh - 78px);min-height:520px;border-radius:0;border-left:0;border-right:0}
  .xat-chat__messages{padding:16px 12px}.xat-chat__bubble{max-width:88%}
  .xat-chat__quick-prompts{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.xat-chat *{animation:none!important;transition:none!important}}
