@import url('./theme.tokens.css');
:root{font-family:var(--ui-font);color:var(--ui-text);background:#fff;--accent:var(--ui-accent);--tint:var(--ui-accent-soft);--canvas:var(--ui-canvas);--rail:var(--ui-canvas);--line:var(--ui-line);--muted:var(--ui-muted);--side:244px;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden;font-size:14px;line-height:1.6}button,input,textarea{font:inherit}button,a,label{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;background:none;color:inherit}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}[hidden]{display:none!important}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}a{color:var(--accent);text-decoration:none}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--side);background:var(--rail);padding:26px 18px 20px;display:flex;flex-direction:column;border-right:1px solid #e4e7ed;z-index:20}.brand{display:flex;align-items:center;gap:10px;margin-bottom:36px;color:var(--ui-text);padding:0 8px}.brand-mark{display:grid;place-items:center;width:32px;height:32px;font-size:17px;font-weight:700;background:var(--accent);border-radius:8px;color:#fff;flex-shrink:0}.brand strong{font-size:21px;letter-spacing:-.8px}.brand-divider{height:15px;width:1px;background:#cdd0df;margin:0 2px}.brand-sub{font-size:12px;color:#8a90a4}.new-chat{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:40px;background:var(--accent);border-radius:7px;color:white;font-size:13px;font-weight:500}.new-chat svg{height:17px;width:17px}.conversation-search{display:flex;align-items:center;gap:8px;margin:22px 7px 27px;color:#959bae}.conversation-search svg{height:15px;width:15px}.conversation-search input{min-width:0;width:100%;background:transparent;border:0;outline:0;font-size:12px;color:var(--ui-text-secondary)}.conversation-search input::placeholder{color:#9299ab}.list-label{font-size:11px;color:#a1a7b7;margin:0 12px 10px}#conversations{overflow:auto;min-height:0;scrollbar-width:thin}#conversations button{width:100%;display:flex;align-items:center;gap:9px;padding:11px 12px;margin-bottom:5px;border-radius:6px;text-align:left;font-size:12px;color:var(--ui-text-secondary)}#conversations button svg{height:15px;width:15px}#conversations button span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#conversations button.active{background:white;color:var(--accent);box-shadow:0 2px 4px #1f232902}.sidebar-bottom{display:flex;align-items:center;gap:10px;margin-top:auto;padding:18px 7px 0;border-top:1px solid #e2e5f0}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#dfe4f4;color:#717da4;font-size:12px;flex-shrink:0}.sidebar-bottom div{display:flex;flex-direction:column;flex:1}.sidebar-bottom strong{font-size:11px;font-weight:500;color:#69738d}.sidebar-bottom div span{font-size:10px;color:#a3a9ba}.sidebar-bottom .icon-button{color:#98a0b4}.app{margin-left:var(--side);display:flex;flex-direction:column;height:100dvh;background:#fff}header{height:68px;flex-shrink:0;border-bottom:1px solid var(--line);padding:0 32px;display:flex;align-items:center;justify-content:space-between;gap:15px}.header-title{display:flex;align-items:center;gap:14px;min-width:0}h1{font-size:16px;font-weight:600;margin:0;white-space:nowrap}.header-divider{height:14px;width:1px;background:var(--line)}#sessionTitle{color:var(--ui-muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:250px}.header-actions{display:flex;align-items:center;gap:22px}.help-button{width:21px;height:21px;display:grid;place-items:center;border:1px solid #c9cdd4;border-radius:50%;font-size:12px;color:#929aac;line-height:1}.icon-button{width:30px;height:30px;display:grid;place-items:center;font-size:23px;border-radius:5px;line-height:1}.icon-button:hover{background:#f2f3f8}.mobile-menu{display:none}#connection{font-size:11px;color:var(--ui-muted)}main{overflow:auto;min-height:0;flex:1;scrollbar-width:thin;scroll-behavior:smooth;overscroll-behavior:contain}.conversation{max-width:850px;padding:35px 35px 20px;margin:0 auto;min-height:100%}.date-separator{font-size:10px;text-align:center;color:#b0b5c3;margin:0 0 28px}.message{margin-bottom:29px;animation:appear .18s ease-out}.message.user{display:flex;justify-content:flex-end;padding-left:50px}.user-bubble{padding:12px 18px;border-radius:11px 3px 11px 11px;background:var(--tint);color:var(--ui-text);font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;max-width:85%}.user-bubble img{display:block;max-width:160px;max-height:160px;margin-top:8px;border-radius:6px}.assistant-head{display:flex;gap:9px;align-items:center;font-size:11px;color:var(--ui-muted);margin:0 0 14px}.assistant-head .brand-mark{width:24px;height:24px;font-size:11px;border-radius:6px}.answer-content{padding-left:33px;font-size:13px;line-height:1.9;color:var(--ui-text)}.answer-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 16px}.answer-text:empty{margin:0}.pending-message{font-size:12px;color:#969daf;display:flex;align-items:center;gap:8px}.pending-message:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent)}.error-message{color:#b14940}.products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:16px 0}.product-card{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff;min-width:0}.product-top{display:grid;grid-template-columns:96px 1fr;align-items:center;padding:13px;gap:12px}.product-image{width:96px;height:112px;object-fit:contain;background:#f5f5f3;padding:5px;border-radius:5px;cursor:zoom-in}.product-title{font-size:12px;line-height:1.65;font-weight:600;margin:0 0 5px}.product-code{font-size:10px;letter-spacing:.3px;color:#969dab;margin-bottom:6px}.product-price{font-size:16px;font-weight:600;line-height:1.4}.product-price small{font-size:9px;font-weight:400;color:#a0a6b4;margin-right:7px}.swatches{display:flex;align-items:center;gap:5px;font-size:10px;color:#9da4b4;margin-top:6px}.swatch{width:9px;height:9px;border:1px solid #0001;border-radius:50%;display:inline-block}.product-footer{display:flex;justify-content:space-between;align-items:center;padding:9px 13px;border-top:1px solid #eff0f1;font-size:10px;color:#9aa1b0}.product-footer button{color:var(--accent);padding:0;font-size:10px;display:flex;align-items:center;gap:2px}.product-footer svg{width:12px;height:12px}.tag{font-size:9px;padding:2px 5px;border-radius:3px;line-height:1.4;background:var(--tint);color:var(--accent);margin-left:5px}.product-detail{padding:13px;border-top:1px solid var(--line);font-size:11px}.product-detail dl{display:grid;grid-template-columns:60px 1fr;gap:6px;margin:0 0 14px}.product-detail dt{color:var(--muted)}.product-detail dd{margin:0}.table-wrap{overflow:auto;margin:12px 0}.data-table{width:100%;border-collapse:collapse;font-size:11px;line-height:1.6;text-align:left}.data-table th{background:var(--ui-canvas);color:#8d95a6;font-weight:400}.data-table th,.data-table td{padding:9px 13px;border-bottom:1px solid var(--line);white-space:nowrap}.reference-list{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 7px}.source-ref{display:inline-flex;gap:6px;align-items:center;border:1px solid var(--line);border-radius:5px;padding:4px 8px;font-size:10px;line-height:1.6;color:var(--ui-text-secondary);background:#fff}.source-ref span{color:var(--accent)}.message-actions{display:flex;gap:9px;align-items:center;margin-top:13px;color:#a2a9b8}.message-actions button{display:flex;align-items:center;gap:5px;font-size:10px;padding:2px 0}.message-actions svg{width:13px;height:13px}.compose-area{flex-shrink:0;max-width:850px;padding:12px 35px 25px;width:100%;margin:auto;background:#fff}.suggestions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:13px}.suggestions button{background:#fff;border:1px solid var(--line);border-radius:5px;font-size:10px;color:var(--ui-muted);padding:5px 10px;display:flex;gap:12px}.suggestions span{color:#b9bfcc}.composer{border:1px solid #d0d3d6;border-radius:11px;padding:13px 15px 10px;box-shadow:0 4px 14px #1f232904}.composer:focus-within{border-color:#85a2ff;box-shadow:0 0 0 2px #3370ff06}textarea{width:100%;min-height:27px;max-height:150px;resize:none;background:transparent;border:0;outline:0;color:var(--ui-text);font-size:13px;line-height:1.8;padding:0;display:block}textarea::placeholder{color:#a8afbe}textarea:focus-visible{outline:0}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.upload-button{width:28px;height:28px;display:grid;place-items:center;color:var(--ui-muted);cursor:pointer}.upload-button:hover{color:var(--accent);background:var(--tint);border-radius:5px}.upload-button input{display:none}.send-actions{display:flex;align-items:center;gap:12px}.send{height:31px;width:33px;background:var(--accent);border-radius:6px;display:grid;place-items:center;color:#fff}.send svg{width:18px;height:18px}.send:disabled{background:#bacefd;opacity:1}#progress{font-size:10px;color:#a0a7b8}.resume{font-size:11px;color:var(--accent)}.stop{height:31px;width:33px;border:1px solid #dfe2ed;border-radius:6px;display:grid;place-items:center}.stop span{width:10px;height:10px;background:#667397;border-radius:2px}.attachment{display:flex;align-items:center;gap:10px;font-size:11px;color:#7b849b;margin:0 0 10px;padding:7px;background:#f8f9fc;border:1px solid var(--line);border-radius:7px}.attachment img{width:38px;height:38px;object-fit:contain}.attachment span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment .icon-button{font-size:19px}.empty-session{height:100%;min-height:280px;display:flex;justify-content:center;align-items:center}.empty-session .brand-mark{width:42px;height:42px;font-size:22px;border-radius:10px;opacity:.7}.shade{position:fixed;inset:0;background:#1d23472e;z-index:19}dialog{width:570px;max-width:calc(100vw - 30px);max-height:85dvh;border:1px solid var(--line);border-radius:11px;padding:24px 28px;color:var(--ui-text);box-shadow:0 20px 70px #20294620}dialog::backdrop{background:#1d234740}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h2{font-size:18px;margin:0}dialog h3{font-size:13px;margin:22px 0 7px}dialog p{font-size:12px;line-height:1.9;color:var(--ui-text-secondary)}dialog .new-chat{margin-top:22px;width:auto;padding:0 20px;height:34px;font-size:12px}#imageDialog{width:auto;max-width:90vw;padding:30px;background:#fff}#largeImage{max-width:80vw;max-height:78dvh;display:block}.image-close{position:absolute;right:3px;top:3px}.toast{position:fixed;left:50%;bottom:140px;transform:translateX(-50%);background:var(--ui-text);color:#fff;padding:10px 17px;border-radius:7px;font-size:12px;z-index:80;max-width:90vw;white-space:pre-wrap}@keyframes appear{from{opacity:.3;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1100px){:root{--side:215px}.conversation{padding:28px 25px 18px}.compose-area{padding:10px 25px 20px}header{padding:0 25px}.products{grid-template-columns:1fr}.product-top{grid-template-columns:85px 1fr}.product-image{width:85px;height:100px}.product-price{font-size:15px}.product-card{max-width:480px}}
@media(max-width:680px){:root{--side:270px}body{font-size:13px}.app{margin:0}.sidebar{transform:translateX(-100%);transition:transform .18s ease}.sidebar.open{transform:translateX(0)}.app header{height:54px;padding:0 15px}.header-title{gap:9px}h1{font-size:15px}.mobile-menu{display:grid;margin-left:-5px}.header-divider,#sessionTitle,.desktop-avatar{display:none}.header-actions{gap:12px}#connection{font-size:10px}.help-button{height:21px;width:21px}main{scroll-behavior:auto}.conversation{padding:23px 16px 10px}.date-separator{font-size:10px;margin-bottom:20px}.message{margin-bottom:25px}.message.user{padding-left:25px}.user-bubble{font-size:12px;padding:10px 13px;max-width:95%}.assistant-head{gap:7px;font-size:10px;margin-bottom:11px}.assistant-head .brand-mark{height:23px;width:23px}.answer-content{padding-left:0;font-size:12px;line-height:1.9}.answer-text{margin-bottom:14px}.products{display:flex;overflow:auto;scroll-snap-type:x proximity;gap:10px;margin:14px 0;padding:0 1px 3px;scrollbar-width:thin}.product-card{min-width:272px;width:272px;flex-shrink:0;scroll-snap-align:start}.product-top{padding:12px;grid-template-columns:86px 1fr;gap:12px}.product-image{width:86px;height:100px}.product-title{font-size:11px}.product-code{font-size:9px}.product-price{font-size:15px}.product-price small{font-size:9px}.product-footer{font-size:9px;padding:8px 11px}.data-table{font-size:10px}.data-table th,.data-table td{padding:8px 10px}.reference-list{gap:6px;margin-top:14px}.source-ref{font-size:9px;padding:4px 6px}.message-actions{margin-top:11px}.compose-area{padding:8px 14px calc(12px + env(safe-area-inset-bottom));max-width:none}.suggestions{gap:6px;margin-bottom:10px;flex-wrap:nowrap;overflow:auto;scrollbar-width:none}.suggestions button{font-size:9px;padding:5px 8px;gap:8px;white-space:nowrap}.composer{padding:10px 12px 8px;border-radius:9px}.composer-bottom{margin-top:6px}textarea{font-size:12px;line-height:1.8;min-height:24px;max-height:100px}.send{height:31px;width:33px}#progress{font-size:9px}.send-actions{gap:9px}.toast{bottom:155px}.product-detail{padding:10px}.empty-session{min-height:150px}dialog{padding:20px}.sidebar-bottom{padding-bottom:env(safe-area-inset-bottom)}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.sidebar-title{margin:0 8px 36px;font-size:21px;font-weight:600;line-height:32px;color:var(--ui-text)}.header-title{flex:1;overflow:hidden}.header-title #sessionTitle{display:block;color:var(--ui-text);font-size:16px;font-weight:600;margin:0;max-width:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-actions{flex-shrink:0;gap:18px}.greeting{font-size:12px;color:var(--ui-muted);white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis}.header-actions .help-button{flex-shrink:0}
@media(max-width:680px){.header-title #sessionTitle{font-size:14px}.header-actions{gap:12px}.greeting{font-size:10px;max-width:110px}.header-title .mobile-menu{flex-shrink:0}header{gap:10px}}
.empty-prompt{font-size:25px;line-height:1.5;font-weight:600;letter-spacing:.2px;color:var(--ui-text);margin:0;text-align:center}#conversations button.active{background:var(--ui-accent-soft);box-shadow:none}.new-chat:hover:not(:disabled),.send:hover:not(:disabled){background:var(--ui-accent-hover)}.user-bubble{background:var(--ui-accent-soft)}.composer{box-shadow:none}.composer:focus-within{border-color:var(--ui-accent);box-shadow:0 0 0 2px #3370ff0d}
@media(max-width:680px){.empty-prompt{font-size:21px;letter-spacing:0}}
/* Text actions stay legible when the composer changes width. */
.upload-button,.send,.mobile-menu { width:auto; min-width:48px; padding-inline:10px; font-size:13px; white-space:nowrap; }
.conversation-search { min-height:34px; padding-inline:8px; border:1px solid var(--ui-line); border-radius:var(--ui-radius); }
@media (prefers-reduced-motion: reduce) {
  .message { animation:none; }
  .sidebar { transition:none; }
  main { scroll-behavior:auto; }
}
