body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}*{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;overflow:hidden}#root{height:100%;width:100%}.App{height:100%;display:flex;flex-direction:column}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion: no-preference){.App-logo{animation:App-logo-spin infinite 20s linear}}.App-header{background-color:#0c1e58;max-height:24vh;display:flex;flex-direction:column;align-items:left;justify-content:left;font-size:calc(10px + 2vmin);color:#fff;position:fixed;margin:0;padding:0;left:0;top:0;width:100%;z-index:10}.App-link{color:#61dafb}@keyframes App-logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wrapper{display:grid;grid-template-columns:repeat(2,1fr);grid-auto-rows:100px}.box1{grid-column-start:1;grid-column-end:4;grid-row-start:1;grid-row-end:3}.box2{grid-column-start:1;grid-row-start:3;grid-row-end:5}.panelTextDark{color:#000;font-weight:700}.panelTextLight{color:#fff;font-weight:700}.spinningAnimation{animation:spinningFrames 5s ease-out;animation-delay:calc(var(--delay) * -1s);animation-fill-mode:forwards}@keyframes spinningFrames{0%{transform:rotate(60deg)}to{transform:rotate(300deg)}}.app-container{display:flex;flex-direction:column;height:100vh;width:100%;overflow:hidden}.chat-container{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:1rem;-webkit-overflow-scrolling:touch;min-height:0}.input-section{flex:0 0 auto;background:#fff;border-top:1px solid #ddd;padding:.75rem;display:flex;flex-direction:row;align-items:flex-end;gap:.5rem;width:100%}.input-section textarea{flex:1 1 auto;min-width:0;min-height:44px;max-height:100px;padding:.75rem;border:1px solid #ddd;border-radius:8px;font-size:16px;font-family:inherit;resize:none}.input-section textarea:focus{outline:none;border-color:#06c}.input-section .button-group{flex:0 0 auto;display:flex;gap:.5rem}.input-section button{width:44px;height:44px;padding:0;border:none;border-radius:8px;background:#06c;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.input-section button:active{background:#0052a3}@media (max-width: 768px){.input-section,.chat-container{padding:.5rem}}:root{--brand: #2f6cf6;--brand-600: #2b5fe0;--brand-700: #244fbd;--bg: #ffffff;--bg-alt: #f6f7fb;--text: #1f2937;--muted: #6b7280;--bubble-user: #2f6cf6;--bubble-assistant: #f0f2f7;--border: #e5e7eb;--shadow: 0 10px 30px rgba(16, 24, 40, .12)}.chat-widget{width:98vw;max-width:1400px;height:98vh;background:var(--bg);border:1px solid var(--brand);border-radius:12px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;font-family:Roboto,Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial;color:var(--text)}.chat-header{background:var(--brand);color:#fff;display:flex;align-items:center;gap:10px;padding:10px 12px}.chat-header .title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:inherit;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;padding:6px;cursor:pointer}.icon-button:hover{background:#ffffff26}.messages{position:relative;flex:1;overflow:auto;background:var(--bg);padding:12px 4.8% 8px}.bot-header{display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 0 8px;color:var(--muted)}.bot-header .bot-name{font-weight:600;color:#111827}.day-sep{text-align:center;color:var(--muted);font-size:12px;margin:8px 0 16px}.msg-row{display:flex;align-items:flex-end;gap:8px;margin-bottom:10px;width:100%}.msg-row.left{justify-content:flex-start}.msg-row.right{justify-content:flex-end}.avatar{width:26px;height:26px;border-radius:13px;background:var(--bg-alt);display:flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid var(--border)}.bubble{max-width:70%;border-radius:12px;font-size:17px;line-height:1.35;word-wrap:break-word;white-space:pre-wrap;border:1px solid transparent}.bubble.assistant{background:var(--bubble-assistant);color:#0b1020;border-color:#e6e9f2;max-width:100%;width:100%;padding:1px 0}.bubble.bot{background:#fff;color:#0b1020;max-width:100%;width:100%;padding:1px 0}.bubble.user{background:var(--bubble-user);color:#fff;border-color:var(--brand-600);width:fit-content;max-width:80%;padding:1px 12px}.footer{border-top:1px solid var(--border);padding:10px;background:#fff}.prompt-wrap{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px}.prompt{display:flex;align-items:center;background:#fff;border:1px solid var(--border);border-radius:10px;padding:6px 10px}.prompt textarea{width:100%;min-height:18px;max-height:160px;border:none;outline:none;resize:none;font-size:13px;line-height:1.35;font-family:Roboto,Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial;color:var(--text)}.prompt textarea::placeholder{color:var(--muted)}.prompt.listening{border:1px solid #ef4444;box-shadow:0 0 0 3px #ef44441a}.prompt.listening textarea::placeholder{color:#ef4444;font-weight:500}.prompt textarea:disabled{color:var(--text);background-color:#fff;opacity:1;-webkit-text-fill-color:var(--text)}.right-controls{display:flex;align-items:center;gap:px}.right-controls .cbtn{width:36px;height:36px;border-radius:18px;border:none;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;background:transparent}.cbtn.send,.cbtn.send:hover{background:transparent}.cbtn.mic{background:transparent;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.cbtn.mic.listening,.cbtn.stop,.cbtn.stop:hover{background:transparent}.typing{display:inline-flex;gap:3px;align-items:center}.typing .dot{width:6px;height:6px;border-radius:3px;background:#9aa3b2;opacity:.4;animation:blink 1.2s infinite}.typing .dot:nth-child(2){animation-delay:.2s}.typing .dot:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.2}40%{opacity:1}}.bubble p{margin:0 0 8px}.bubble p:last-child{margin-bottom:0}.bubble h1,.bubble h2,.bubble h3,.bubble h4,.bubble h5,.bubble h6{margin:0 0 8px;line-height:1.25;font-weight:700}.bubble ul,.bubble ol{margin:4px 0 4px 18px;padding:0}.bubble blockquote{margin:0 0 8px;padding:6px 10px;border-left:3px solid #d1d5db;background:#6b728014;border-radius:6px}.bubble code{background:#1018280f;border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em}.bubble pre{background:#0b1020;color:#e5e7eb;border-radius:8px;padding:10px 12px;overflow:auto;margin:0 0 8px}.bubble pre code{background:transparent;padding:0;color:inherit}.md-table-wrap{overflow:auto}.bubble table{border-collapse:collapse;width:100%;margin-bottom:8px}.bubble th,.bubble td{border:1px solid #e5e7eb;padding:6px 8px;text-align:left}.bubble thead th{background:#f3f4f6}.bubble a{color:#1d4ed8;text-decoration:underline}.bubble a:hover{color:#1e40af}@media (max-width: 768px){.chat-widget{width:100%;max-width:100%;height:100%;max-height:100%;border-radius:0;border:none}.messages{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}.footer{flex:0 0 auto;position:relative;z-index:1000;background:#fff;padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}.footer textarea{font-size:16px}.right-controls{flex-shrink:0}.right-controls .cbtn{width:44px;height:44px}}.sources-section{margin-top:12px;padding-top:8px;border-top:1px solid rgba(0,0,0,.1)}.sources-toggle{background:transparent;border:none;cursor:pointer;font-size:.8rem;color:#888;padding:4px 8px;border-radius:4px;transition:all .2s}.sources-toggle:hover{background:#0000000d;color:#666}.sources-list{list-style:none;padding:0;margin:8px 0 0;font-size:.8rem}.source-item{padding:4px 8px;border-radius:4px;margin-bottom:4px;background:#00000008}.source-item a{color:#1d4ed8;text-decoration:none;display:flex;align-items:center;gap:6px}.source-item a:hover{text-decoration:underline}.source-item span{display:flex;align-items:center;gap:6px;color:#666}.source-item.web{background:#19b6dd1a}.source-item.document{background:#0c1e580d}.message-images-carousel{margin-top:12px;border-radius:8px;background:#00000005;padding:12px}.carousel-controls{display:flex;justify-content:center;align-items:center;gap:16px;margin-bottom:12px}.carousel-btn{background:#0c1e58;color:#fff;border:none;border-radius:50%;width:36px;height:36px;font-size:16px;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.carousel-btn:hover{background:#19b6dd;transform:scale(1.1)}.carousel-btn:active{transform:scale(.95)}.carousel-counter{font-size:14px;font-weight:600;color:#333;min-width:100px;text-align:center}.carousel-thumbnails{display:flex;justify-content:center;gap:8px;margin-top:12px;flex-wrap:wrap}.carousel-thumbnail{background:#e0e0e0;border:2px solid transparent;border-radius:6px;width:40px;height:40px;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600;color:#666}.carousel-thumbnail:hover{background:#d0d0d0;transform:translateY(-2px)}.carousel-thumbnail.active{background:#0c1e58;border-color:#0c1e58;color:#fff}.image-container{background:#f9f9f9;border-radius:8px;padding:8px;border:1px solid #e0e0e0}.rag-image{max-width:100%;height:auto;border-radius:6px;display:block;margin:0 auto;box-shadow:0 2px 8px #0000001a}.image-caption{margin-top:8px;font-size:.85rem;color:#666;text-align:left;padding:0 8px}.image-description{font-size:14px;color:#333;font-weight:500;margin:0 0 6px;line-height:1.4}.image-metadata{font-size:12px;color:#888;margin:4px 0}.image-ocr{margin-top:6px;font-size:.8rem}.image-ocr summary{cursor:pointer;color:#19b6dd;-webkit-user-select:none;user-select:none}.image-ocr summary:hover{color:#0c1e58}.image-ocr p{margin-top:6px;padding:8px;background:#fff;border-radius:4px;color:#555;max-height:150px;overflow-y:auto;white-space:pre-wrap;word-break:break-word}.image-error{padding:16px;background:#fff3cd;border:1px solid #ffc107;border-radius:6px;color:#856404;text-align:center;font-size:.9rem}.image-ocr-fallback{margin-top:8px;font-size:.85rem;color:#666;background:#fff;padding:8px;border-radius:4px}.image-zoom-modal{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000f2;display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);animation:fadeInZoom .2s ease}@keyframes fadeInZoom{0%{opacity:0}to{opacity:1}}.zoom-close-btn{position:absolute;top:20px;right:20px;background:#ffffffe6;border:none;border-radius:50%;width:48px;height:48px;font-size:28px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#333;box-shadow:0 4px 12px #0000004d;transition:all .2s ease;z-index:10001}.zoom-close-btn:hover{background:#fff;transform:scale(1.1);box-shadow:0 6px 16px #0006}.zoom-content{max-width:95vw;max-height:95vh;display:flex;flex-direction:column;align-items:center;gap:20px;animation:scaleInZoom .3s ease}@keyframes scaleInZoom{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.zoomed-image{max-width:100%;max-height:75vh;object-fit:contain;border-radius:8px;box-shadow:0 8px 32px #00000080}.zoom-caption{background:#fffffff2;padding:16px 24px;border-radius:8px;max-width:800px;box-shadow:0 4px 16px #0000004d}.zoom-caption-text{font-size:16px;color:#333;margin:0 0 8px;font-weight:500;line-height:1.5}.zoom-technical-caption{font-size:13px;color:#666;margin:0 0 8px;font-style:italic}.zoom-page-info{font-size:14px;color:#666;margin:8px 0 0;font-weight:400}.zoom-ocr{margin-top:12px;border-top:1px solid #e0e0e0;padding-top:12px}.zoom-ocr summary{cursor:pointer;font-size:14px;color:#19b6dd;font-weight:500}.zoom-ocr summary:hover{color:#0c1e58}.zoom-ocr p{margin:8px 0 0;font-size:14px;color:#666;line-height:1.6}@media (max-width: 768px){.zoom-close-btn{width:40px;height:40px;font-size:24px;top:15px;right:15px}.zoomed-image{max-height:70vh}.zoom-caption{padding:12px 16px;font-size:14px}.zoom-caption-text{font-size:14px}}
