:focus{outline:none}:focus-visible{outline:2px solid var(--brand);outline-offset:0px}.noring:focus,.noring:focus-visible{outline:none}.gradient-hover{position:relative;overflow:hidden}.gradient-hover:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--gradient-amethyst-to-brand);opacity:0;transition:opacity .4s ease;border-radius:inherit;z-index:0}.gradient-hover:hover:not(:disabled):before,.gradient-hover:focus-visible:before{opacity:1}.gradient-hover>*{position:relative;z-index:1}html,body{margin:0;padding:0;height:100%;overflow:hidden}#root{height:100%;overflow:hidden}.modern-chat{display:flex;height:100vh;width:100vw;background:var(--gradient-brand-to-amethyst);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;position:fixed;top:0;left:0;overflow:hidden;z-index:1000}.sidebar{width:var(--sidebar-width, 280px);min-width:200px;max-width:500px;background:linear-gradient(135deg,#2c3e50,#34495e);color:#fff;display:flex;flex-direction:column;transition:width .3s ease,min-width .3s ease,transform .3s ease;position:relative;z-index:100}.sidebar-resize-handle{position:absolute;top:0;right:-2px;width:8px;height:100%;cursor:ew-resize;background:transparent;transition:all .2s ease;z-index:101}.sidebar-resize-handle:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:2px;height:40px;background:#ffffff4d;border-radius:1px;opacity:0;transition:opacity .2s ease}.sidebar-resize-handle:hover:after{opacity:1}.sidebar-resize-handle:hover,.sidebar-resize-handle:active{background:#667eea1a}.sidebar-resize-handle:active:after{background:var(--brand);opacity:1}.sidebar:not(.open){width:0;min-width:0;overflow:hidden}.sidebar.open{width:var(--sidebar-width, 280px)}.sidebar-backdrop{display:none}@media(max-width:768px){.sidebar-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;z-index:1000;opacity:0;transition:opacity .3s ease}.sidebar-backdrop.visible{display:block;opacity:1}.sidebar{position:fixed;top:0;left:0;height:100%;transform:translate(-100%);width:280px;min-width:280px;max-width:280px;z-index:1001;box-shadow:2px 0 10px #0000004d}.sidebar.open{transform:translate(0)}.sidebar-resize-handle{display:none}}.sidebar-header{padding:16px;border-bottom:1px solid rgba(255,255,255,.1)}.chat-btn{width:100%;padding:12px 16px;border:none;color:#fff;border-radius:8px;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #0000001a}.chat-btn:hover,.chat-btn:focus{transform:translateY(-1px) scale(1.02);box-shadow:0 4px 12px #0003}.chat-btn.new{background:linear-gradient(135deg,#3498db,#2980b9)}.chat-btn.new:hover,.chat-btn.new:focus{background:linear-gradient(135deg,#42a5d7,#3498db);box-shadow:0 4px 12px #3498db4d}.chat-btn.search{padding:10px 16px;font-size:13px;margin-top:8px;background:linear-gradient(135deg,#27ae60,#2ecc71)}.chat-btn.search:hover,.chat-btn.search:focus{background:linear-gradient(135deg,#2ab866,#52d681);box-shadow:0 4px 12px #27ae604d}.chat-history{flex:1;padding:16px 8px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.chat-history::-webkit-scrollbar{width:6px}.chat-history::-webkit-scrollbar-track{background:transparent}.chat-history::-webkit-scrollbar-thumb:hover{background:#fff6}.chat-history-section{margin-bottom:20px}.chat-history-section h4{color:#ffffffb3;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;margin:0 0 8px 12px}.chat-history-item{padding:12px 16px;margin:4px 0;border-radius:8px;cursor:pointer;font-size:14px;color:#fffc;transition:all .2s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.chat-history-item:hover,.chat-history-item:has(.chat-history-content:focus-visible){background:#ffffff1a;color:#fff}.chat-history-item:focus-within{background:#ffffff0d;outline:var(--brand) solid 1px}.chat-history-content{flex:1;display:flex;flex-direction:column;gap:2px;overflow:hidden}.chat-delete-btn{background:none;border:none;color:#ffffff80;cursor:pointer;padding:4px;border-radius:4px;transition:all .3s ease;opacity:0;flex-shrink:0;outline:none}.chat-history-item:hover .chat-delete-btn,.chat-history-item:focus-within .chat-delete-btn,.chat-delete-btn:is(:focus,:focus-visible){opacity:1}.chat-delete-btn svg{color:var(--gray-400);transition:color .3s ease}.chat-delete-btn:is(:hover,:focus,:focus-visible) svg{color:#ff4757;filter:drop-shadow(0px 0px 10px #ff0000) drop-shadow(0px 0px 15px #ff0000)}.chat-history-item.active{background:linear-gradient(135deg,#3498db,#2980b9);color:#fff;box-shadow:0 2px 4px #0000001a}.chat-history-item.loading{opacity:.6;cursor:wait;pointer-events:none}.chat-history-item.loading:after{content:"";position:absolute;top:50%;right:12px;width:12px;height:12px;border:1px solid rgba(255,255,255,.3);border-top:1px solid rgba(255,255,255,.8);border-radius:50%;animation:spin 1s linear infinite;transform:translateY(-50%)}.chat-history-item small{font-size:11px;opacity:.7}.chat-history-item .chat-timestamp{font-size:10px;opacity:.6;font-weight:400}.sidebar-footer{padding:16px 8px;border-top:1px solid rgba(255,255,255,.1)}.sidebar-btn{width:100%;padding:12px 16px;background:transparent;border:none;color:#fffc;text-align:left;display:flex;align-items:center;gap:12px;font-size:14px;cursor:pointer;border-radius:8px;transition:all .2s ease;margin:2px 0}.sidebar-btn:hover{background:#ffffff1a;color:#fff}.chat-main{flex:1;display:flex;flex-direction:column;background:#fff;overflow:hidden;box-shadow:-2px 0 20px #0000001a}.chat-header{display:flex;align-items:center;padding:16px 20px;border-bottom:1px solid #e1e5e9;background:linear-gradient(135deg,#f8f9fa,#e9ecef);gap:16px}.header-title{display:flex;align-items:center;gap:12px;flex:1}.title-text{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.gradient-text{--gt-colors: linear-gradient(90deg, var(--brand) 0%, var(--amethyst) 100%);background:var(--gt-colors);background-size:var(--gt-size);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;display:inline-block;filter:drop-shadow(0 0 10px rgba(102,126,234,.3))}.gradient-text.animated{--gt-colors: linear-gradient( 90deg, var(--brand) 0%, #6E7EEA 15%, var(--amethyst) 35%, var(--amethyst) 65%, #6E7EEA 85%, var(--brand) 100% );--gt-size: 300% 100%;--gt-duration: 10s;animation:textScroll var(--gt-duration) linear infinite}.gradient-text.theme-start-later{--gt-colors: linear-gradient(90deg, #6B6DD2 0%, var(--amethyst) 50%, #6B6DD2 100%);--gt-duration: 7.5s}.gradient-text.theme-stop-earlier{--gt-colors: linear-gradient(90deg,var(--brand) 0%,#6B6DD2 100%)}h1.gradient-text,h1.gradient-text.animated{margin:0;font-size:1.25rem;font-weight:600}@keyframes textScroll{0%{background-position:0% 50%}to{background-position:300% 50%}}.current-chat-title{font-size:.8rem;color:var(--gray-600);font-weight:400;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-logo{width:32px;height:32px;filter:drop-shadow(1px 2px 1px rgba(43,43,54,.808));transition:all .3s ease}.header-logo:hover{filter:drop-shadow(1px 2px 1px rgba(43,43,54,.508)) drop-shadow(0px 2px 8px rgba(92,95,246,.582));transform:translateY(-1px) scale(1.05)}.menu-btn{background:none;border:none;cursor:pointer;padding:8px;border-radius:6px;color:var(--gray-600);transition:all .2s ease}.menu-btn:hover,.menu-btn:focus-visible{background:#3b82f61a;color:#3b82f6;outline:none}.chat-header h1{margin:0;font-size:20px;font-weight:600}.header-actions{display:flex;align-items:center;gap:12px}.profile-dropdown-container{position:relative}.profile-btn{width:40px;height:40px;border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--gradient-brand-to-amethyst);color:#fff;box-shadow:0 2px 8px #626fd826;transition:box-shadow .3s ease,filter .3s ease;position:relative}.profile-btn:hover,.profile-btn:focus-visible{box-shadow:0 4px 16px #626fd84d;filter:brightness(1.1);outline:none}.profile-btn:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.profile-btn:active{box-shadow:0 2px 4px #626fd833;filter:brightness(.95)}.profile-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid var(--gray-200);border-radius:8px;box-shadow:0 10px 25px #00000026;min-width:180px;z-index:1000;animation:fadeIn .2s ease}.dropdown-item{width:100%;background:none;border:none;padding:12px 16px;text-align:left;cursor:pointer;display:flex;align-items:center;gap:10px;font-size:14px;color:var(--gray-700);transition:background .2s ease}.dropdown-item:hover{background:var(--neutral-100)}.dropdown-item.top{border-radius:7px 7px 0 0}.dropdown-item.logout{color:#dc2626;border-top:1px solid var(--gray-200);border-radius:0 0 7px 7px}.dropdown-item.logout:hover{background:#fef2f2}.mode-selector,.model-selector{position:relative}.mode-select,.model-select{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:6px 12px;font-size:13px;color:var(--gray-700);cursor:pointer;transition:all .2s ease}.mode-select:hover,.model-select:hover{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.header-btn{background:none;border:none;cursor:pointer;padding:8px;border-radius:6px;color:var(--gray-600);transition:all .2s ease}.header-btn:hover{background:#3b82f61a;color:#3b82f6}.messages-container{flex:1;overflow-y:auto;background:linear-gradient(135deg,#f8f9fa,#e9ecef);position:relative;z-index:0}.messages-container:after{--scale: 1;--peek: .18;--w: clamp(300px, 45svmin, 700px);content:"";position:fixed;top:50%;right:calc(-1 * (var(--peek) * var(--w)) - (var(--w) * (var(--scale) - 1) * .5));transform:translateY(-50%) scale(var(--scale));transform-origin:right center;width:var(--w);aspect-ratio:1;background-image:url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2081.64%2080.77'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%23313192;%20}%20%3c/style%3e%3c/defs%3e%3cg%3e%3cpath%20class='cls-1'%20d='M48.83,55.35c.68-.9,1.17-1.76,1.45-2.57.29-.81.43-1.62.43-2.41,0-1.8-.58-3.22-1.75-4.26-1.17-1.03-2.67-1.55-4.52-1.55s-3.51.5-4.98,1.49c-1.28.86-2.52,2.2-3.72,4.01-.02.03-.04.04-.06.06-.04.05-.09.1-.14.14-.04.03-.08.06-.13.08-.06.03-.13.05-.2.07-.04,0-.08.02-.13.03-.03,0-.05.02-.08.02h-4.27v9.42c0,.49-.4.88-.88.88h-8.53c-.49,0-.88-.4-.88-.88v-9.42H1.05c.86,3.9,2.24,7.68,4.17,11.19,3.75,6.84,8.85,12.12,15.3,15.83,2.44,1.41,5.06,2.5,7.82,3.31v-3.51c0-.23.09-.45.25-.61l17.64-18.23c1.06-1.14,1.92-2.17,2.61-3.07Z'/%3e%3cpath%20class='cls-1'%20d='M81.51,37.73c-.54.49-1.11.95-1.75,1.35-1.98,1.24-4.33,1.9-7.07,1.97-2.65.07-4.97-.47-6.96-1.62-2.11-1.21-3.77-2.93-4.99-5.17-1.11-2.03-1.69-4.33-1.7-6.64-.01-2.36.49-4.53,1.5-6.53,1.06-2.08,2.6-3.74,4.62-4.99,2.02-1.25,4.36-1.9,7-1.97.15,0,.3.01.45.01-2.93-3.69-6.49-6.76-10.69-9.18C55.8,1.47,48.57-.19,40.2.02c-8.11.2-15.26,2.21-21.45,6.03-6.19,3.82-10.91,8.91-14.14,15.27C1.49,27.42-.04,34.08,0,41.31c0,.1,0,.19.01.29L13.52,14.63c.15-.3.46-.49.79-.49h9.36c.66,0,1.09.7.78,1.29l-13.42,26.11h9.4v-8.76c0-.49.4-.88.88-.88h8.53c.49,0,.88.4.88.88v8.68c1.36-1.5,2.87-2.75,4.57-3.7,2.84-1.58,6.13-2.38,9.87-2.38,3.21,0,6.01.59,8.38,1.78,2.38,1.19,4.2,2.88,5.48,5.08,1.28,2.2,1.91,4.78,1.91,7.72,0,1.89-.23,3.62-.69,5.18-.46,1.56-1.23,3.09-2.31,4.59-1.08,1.5-2.52,3.15-4.32,4.95l-9.27,9.18h16.71c.49,0,.88.4.88.88v2.55c.52-.29,1.05-.58,1.55-.9,6.05-3.81,10.64-8.84,13.76-15.07,3.12-6.23,4.58-13.39,4.38-21.51-.02-.71-.06-1.4-.11-2.1Z'/%3e%3c/g%3e%3cpath%20class='cls-1'%20d='M69.32,22.76c-.85.53-1.5,1.23-1.95,2.1-.43.84-.64,1.76-.63,2.75,0,.97.25,1.94.72,2.8.52.94,1.22,1.67,2.1,2.18.84.48,1.82.71,2.93.68,1.15-.03,2.14-.3,2.98-.83.83-.52,1.46-1.22,1.89-2.07.43-.86.63-1.84.6-2.96-.02-1.01-.27-1.94-.74-2.79-.47-.85-1.13-1.52-1.97-2-.84-.48-1.84-.71-2.99-.68-1.12.03-2.1.3-2.95.83Z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center;background-size:contain;opacity:.12;mix-blend-mode:soft-light;pointer-events:none;z-index:0;filter:blur(.2px);-webkit-mask-image:radial-gradient(65% 75% at 59% 50%,#000 40%,transparent 85%);mask-image:radial-gradient(65% 75% at 59% 50%,#000 40%,transparent 85%)}@media(max-width:600px){.messages-container:after{--w: clamp(260px, 32svmin, 600px);--scale: 1.25;--peek: .19;opacity:.1;-webkit-mask-image:radial-gradient(70% 75% at 55% 50%,#000 40%,transparent 80%);mask-image:radial-gradient(70% 75% at 55% 50%,#000 40%,transparent 80%)}}@media(min-width:601px)and (max-width:1024px){.messages-container:after{--w: clamp(300px, 40svmin, 600px);--scale: 1.5;--peek: .19;opacity:.08}}@media(min-width:1440px){.messages-container:after{--w: clamp(350px, 45svmin, 700px);--scale: 1.2;--peek: .19;opacity:.11}}@media(min-width:1920px){.messages-container:after{--w: clamp(400px, 55svmin, 800px);--scale: 1.2;--peek: .22;opacity:.12}}@media(min-width:3840px){.messages-container:after{--w: clamp(400px, 55svmin, 800px);--scale: 1.75;--peek: .2;opacity:.12}}@media(max-width:900px)and (orientation:landscape){.messages-container:after{--w: clamp(200px, 40svh, 350px);--scale: 1.15;--peek: .19;opacity:.1}}.messages{max-width:800px;margin:0 auto;padding:24px}.message{display:flex;gap:16px;margin-bottom:24px;animation:fadeIn .4s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.message.user{flex-direction:row-reverse}.assistant-avatar{width:36px;height:36px;border-radius:50%}.message-content{flex:1;min-width:0}.message.user .message-content{text-align:right}.message-text{background:#fff;padding:16px 20px;border-radius:18px;font-size:15px;line-height:1.6;white-space:pre-wrap;word-wrap:break-word;position:relative;box-shadow:0 2px 8px #0000001a;border:1px solid #e1e5e9}.message.user .message-text{background:var(--gradient-brand-to-amethyst);color:#fff;border-bottom-right-radius:4px;border:none}.message.assistant .message-text{background:linear-gradient(135deg,#f8f9fa,#fff);color:var(--gray-700);border-bottom-left-radius:4px}.message-sources{margin-top:12px;padding:16px;background:#3b82f60d;border-radius:12px;border:1px solid rgba(59,130,246,.1)}.message-sources h4{margin:0 0 8px;font-size:14px;font-weight:600;color:var(--gray-700)}.sources-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}.source-item{background:#fff;border:1px solid #d1d5db;border-radius:8px;padding:8px 12px;display:flex;align-items:center;gap:8px;cursor:pointer;transition:all .2s ease;font-size:13px}.source-item:hover{border-color:#3b82f6;background:#3b82f60d}.message-footer{display:flex;justify-content:space-between;align-items:center;margin-top:8px;padding:0 4px}.message-time{font-size:12px;color:var(--gray-400);display:flex;align-items:center;gap:8px}.run-id{background:#9ca3af33;padding:2px 6px;border-radius:4px;font-family:monospace}.message-actions{display:flex;gap:4px;opacity:0;transition:opacity .2s ease}.message:hover .message-actions,.message:focus .message-actions,.message-actions:is(:focus-within,:focus-visible){opacity:1}.action-btn{background:none;border:none;color:var(--gray-400);cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.action-btn:hover,.action-btn:focus{background:#9ca3af1a;color:var(--gray-600);filter:drop-shadow(0px 5px 5px rgba(0,0,0,.2))}.cursor{animation:blink 1s infinite;color:var(--brand);font-weight:700}@keyframes blink{0%,50%{opacity:1}51%,to{opacity:0}}.welcome-screen{text-align:center;padding:60px 20px;max-width:700px;margin:0 auto}.welcome-logo{margin-bottom:32px}.welcome-avatar{width:80px;height:80px;border-radius:0%;filter:drop-shadow(4px 5px 3px rgba(0,0,0,.5))}.welcome-screen h2{font-size:36px;font-weight:700;margin:0 0 12px}.welcome-screen p{font-size:18px;color:var(--gray-600);margin:0 0 40px;line-height:1.6}.suggestion-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;margin-top:40px}.input-container{padding:20px;border-top:1px solid var(--gray-200);background:#fff}.input-wrapper{max-width:800px;margin:0 auto;position:relative;background:#fff;border:2px solid var(--gray-200);border-radius:16px;overflow:hidden;display:flex;align-items:center;transition:all .2s ease}.input-wrapper:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px #667eea1a}.attach-btn{background:none;border:none;border-radius:100%;margin-left:4px;color:var(--gray-400);cursor:pointer;padding:12px;transition:all .2s ease;flex-shrink:0;display:flex;align-items:center;justify-content:center}.attach-btn:focus{background:#9ca3af1a;color:var(--gray-600);outline:none}.attach-btn svg{color:var(--gray-400);transition:color .2s ease}.attach-btn:hover svg,.attach-btn:focus svg{color:var(--brand)}.message-input{flex:1;border:none;outline:none;padding:16px 8px;font-size:15px;line-height:1.5;resize:none;max-height:200px;overflow-y:auto;background:transparent;font-family:inherit}.message-input::placeholder{color:var(--gray-400)}.send-btn{background:var(--gradient-brand-to-amethyst);border:none;color:#fff;width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:8px;transition:transform .2s ease,box-shadow .2s ease;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.send-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.send-btn:disabled{background:#d1d5db;cursor:not-allowed;transform:none;box-shadow:none}.stop-btn{position:relative;overflow:hidden;background:linear-gradient(135deg,#e74c3c,#c0392b);border:none;color:#fff;width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:8px;transition:all .2s ease;flex-shrink:0;box-shadow:0 2px 4px #0000001a;animation:pulse 2s infinite}.stop-btn:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg,#c0392b,#e74c3c);opacity:0;transition:opacity .4s ease;border-radius:12px;z-index:0}.stop-btn:hover:before{opacity:1}.stop-btn:hover{transform:translateY(-1px);box-shadow:0 4px 8px #e74c3c4d}.stop-btn>*{position:relative;z-index:1}@keyframes pulse{0%{box-shadow:0 2px 4px #0000001a}50%{box-shadow:0 2px 4px #e74c3c4d,0 0 0 4px #e74c3c1a}to{box-shadow:0 2px 4px #0000001a}}.input-footer{max-width:800px;margin:12px auto 0;display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;gap:12px;min-height:32px}.footer-left{flex-shrink:1;min-width:0}.footer-left p{font-size:12px;color:var(--gray-400);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer-controls{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;flex-shrink:0;overflow:visible}@media(max-width:900px){.footer-controls{gap:8px}}@keyframes slideIn{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.search-result{padding:16px;border:1px solid var(--gray-200);border-radius:8px;margin-bottom:8px;cursor:pointer;transition:all .2s ease}.search-result:hover{border-color:var(--brand);background:#667eea0d}.search-result h4{margin:0 0 8px;font-size:16px;color:var(--gray-700)}.search-result p{margin:0;font-size:14px;color:var(--gray-600)}.stat-item{text-align:center;flex:1;padding:16px;background:transparent;border:2px dashed var(--dashes);border-radius:10px;transition:all .2s ease}.stat-item:hover{background:var(--bg-tertiary)}.stat-item.old{border:none;background:var(--bg-tertiary)}.stat-item strong{display:block;font-size:24px;font-weight:700;color:var(--brand);margin-bottom:4px}.stat-item span{font-size:12px;color:var(--gray-600);text-transform:uppercase;letter-spacing:.5px}.stat-item small{display:block;margin-top:5px;font-size:14px;color:var(--gray-400);text-transform:none;letter-spacing:0;line-height:1.2}.stat-number{display:block;font-size:1.8rem;font-weight:700;color:var(--brand);line-height:1}.stat-label{display:block;font-size:.85rem;font-weight:400;color:var(--gray-600);margin-top:4px;text-transform:uppercase;letter-spacing:.5px}.message-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 2px 8px #0000001a}.message.user .message-avatar{background:var(--gradient-brand-to-amethyst);color:#fff}.message.assistant .message-avatar{background:linear-gradient(135deg,#b3c5f0,#c7e3ee);padding:2px}@media(max-width:768px){.modern-chat{background:#fff}.chat-main{border-radius:0}.messages{padding:16px}.message-text{padding:12px 16px;font-size:14px}.suggestion-cards{grid-template-columns:1fr}.input-container{padding:16px}.input-footer{flex-direction:column;align-items:flex-start;gap:8px}.footer-left{order:2;width:100%}.footer-left p{white-space:normal}.footer-controls{order:1;width:100%;justify-content:flex-start;gap:8px;flex-wrap:wrap}.footer-selector{flex:1;min-width:100px}.footer-select{width:100%;min-width:auto}.welcome-screen{padding:40px 20px}.welcome-screen h2{font-size:28px}.header-actions{display:none}}@media(prefers-color-scheme:dark){.modern-chat{background:linear-gradient(135deg,#1e293b,#0f172a)}.chat-main{background:#1e293b}.chat-header{background:linear-gradient(135deg,#334155,#475569);border-bottom-color:#475569;color:#fff}.chat-header h1{color:#fff}.messages-container{background:linear-gradient(135deg,#1e293b,#334155)}.message.assistant .message-text{background:linear-gradient(135deg,var(--gray-700) 0%,#4b5563 100%);color:#fff;border-color:var(--gray-600)}.welcome-screen h2{color:#fff}.input-wrapper{background:var(--gray-700);border-color:var(--gray-600)}.message-input{color:#fff}.input-container{background:#1e293b;border-top-color:#475569}}.files-list h4{margin-bottom:18px;color:var(--gray-800);font-size:1.2rem;font-weight:600}.empty-state{text-align:center;padding:50px 20px;color:var(--gray-600);background:#f9fafb;border-radius:12px;border:2px dashed #d1d5db}.empty-state p{margin:0;font-size:1.1rem}.file-grid{display:flex;flex-direction:column;gap:12px}.file-item{display:flex;align-items:center;justify-content:space-between;padding:16px;background:var(--message-bg);border-radius:12px;border:1px solid var(--gray-200);transition:all .2s ease;transform:translateY(0);box-shadow:0 2px 4px #0000000d}.file-item:hover{background:var(--neutral-100);border-color:var(--brand);transform:translateY(-1px);box-shadow:0 4px 8px #0000001a}.file-info{display:flex;align-items:center;gap:14px;flex:1}.file-details{display:flex;flex-direction:column;gap:6px}.file-name{font-weight:600;color:var(--gray-800);font-size:.95rem}.file-meta{font-size:.8rem;color:var(--gray-600)}.file-actions{display:flex;gap:8px}.select-wrapper{position:relative}.select-wrapper select{width:100%;padding:12px 40px 12px 16px;border:2px solid var(--gray-200);border-radius:8px;background:#fff;font-size:.95rem;color:var(--gray-700);cursor:pointer;transition:all .2s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23374151' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.select-wrapper select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px #667eea1a}.file-info-detailed{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}.file-name-full{font-size:.85rem;font-weight:600;color:var(--gray-800);margin:0 0 8px;line-height:1.2;height:2.4em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.file-meta-detailed{display:flex;flex-direction:column;gap:4px;font-size:.72rem;color:var(--gray-600);margin-bottom:8px}.file-status{background:var(--neutral-100);padding:2px 6px;border-radius:4px;font-size:.65rem;font-weight:500;border:1px solid var(--gray-200);align-self:flex-start;white-space:nowrap}.file-status.indexed{background:#d1fae5;color:#065f46;border-color:#a7f3d0}.file-status.processing,.file-status.staging{background:#fef3c7;color:#92400e;border-color:#fcd34d}.file-status.error,.file-status.empty{background:#fee2e2;color:#991b1b;border-color:#fca5a5}.file-size{background:#f8fafc;padding:2px 6px;border-radius:4px;font-weight:500;font-size:.7rem;align-self:flex-start;white-space:nowrap}.action-btn.small{padding:8px;min-height:28px;min-width:28px;border-radius:6px;display:flex;align-items:center;justify-content:center}.action-btn.secondary{background:#f8fafc;color:var(--gray-700);border:1px solid var(--gray-200)}.action-btn.secondary:hover,.action-btn.secondary:focus{background:var(--gray-200);color:var(--gray-800);border-color:#d1d5db;outline:none}.action-btn.danger{background:#fee2e2;color:#dc2626;border:1px solid #fca5a5}.action-btn.danger:hover,.action-btn.danger:focus{background:#fecaca;color:#991b1b;border-color:#f87171;outline:none;filter:drop-shadow(0px 5px 5px rgba(220,38,38,.35))}.empty-state .empty-icon{font-size:3rem;margin-bottom:12px;opacity:.5}.empty-state span{display:block;font-size:.9rem;color:var(--gray-400);margin-top:8px}.modern-chat.animations-disabled *,.modern-chat.animations-disabled *:before,.modern-chat.animations-disabled *:after{animation-duration:0s!important;animation-delay:0s!important;transition-duration:0s!important;transition-delay:0s!important}.message-text .inline-code{background:var(--bg-tertiary);padding:2px 6px;border-radius:4px;font-family:SFMono-Regular,Monaco,Menlo,Consolas,monospace;font-size:.9em;color:var(--gray-700);border:1px solid var(--gray-200)}.message-text .code-block{background:var(--bg-tertiary)!important;border:1px solid var(--gray-200);border-radius:8px;margin:12px 0;overflow-x:auto;font-family:SFMono-Regular,Monaco,Menlo,Consolas,monospace!important;font-size:.9em!important;line-height:1.5!important}.message-text .code-block-container{position:relative;margin:6px 0!important;border-radius:6px;overflow:hidden;border:1px solid var(--gray-200)}.message-text .code-header{position:absolute;top:8px;right:8px;display:flex;align-items:center;gap:8px;z-index:10}.message-text .code-language-tag{background:var(--primary-color);color:#fff;padding:4px 8px;font-size:.75em;font-weight:500;border-radius:4px;text-transform:uppercase;font-family:SFMono-Regular,Monaco,Menlo,Consolas,monospace}.message-text .code-copy-btn{background:#ffffffe6;border:1px solid var(--gray-200);border-radius:4px;padding:4px 6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;color:var(--text-secondary)}.message-text .code-copy-btn:hover{background:#fff;color:var(--gray-700);transform:scale(1.05)}.message-text .code-block code{background:none;padding:0;border:none;color:var(--gray-700)}.message-text .markdown-blockquote{border-left:4px solid var(--primary-color);margin:6px 0!important;font-style:italic;color:var(--text-secondary);background:var(--bg-secondary);padding:6px 12px;border-radius:0 6px 6px 0}.message-text .table-container{overflow-x:auto;margin:6px 0!important;border-radius:6px;border:1px solid var(--gray-200)}.message-text .markdown-table{width:100%;border-collapse:collapse;background:var(--bg-secondary)}.message-text .markdown-table th,.message-text .markdown-table td{padding:12px;text-align:left;border-bottom:1px solid var(--gray-200)}.message-text .markdown-table th{background:var(--bg-tertiary);font-weight:600;color:var(--gray-700)}.message-text .markdown-table tr:last-child td{border-bottom:none}.message-text .markdown-h1{font-size:1.5em;font-weight:600;margin:8px 0 4px!important;color:var(--gray-700);border-bottom:2px solid var(--gray-200);padding-bottom:4px}.message-text .markdown-h2{font-size:1.3em;font-weight:600;margin:6px 0 3px!important;color:var(--gray-700)}.message-text .markdown-h3{font-size:1.1em;font-weight:600;margin:4px 0 2px!important;color:var(--gray-700)}.message-text .markdown-list{margin:4px 0!important;padding-left:20px}.message-text .markdown-list li{margin:1px 0!important;line-height:1.4}.message-text .markdown-link{color:var(--primary-color);text-decoration:none;border-bottom:1px solid transparent;transition:all .2s ease;font-weight:500}.message-text .markdown-link:hover{border-bottom-color:var(--primary-color);background:#3498db1a;padding:2px 4px;border-radius:4px;text-decoration:underline}.markdown-image-container{margin:12px 0;display:block;text-align:center}.markdown-image{max-width:100%;max-height:400px;border-radius:8px;box-shadow:0 2px 8px #0000001a;cursor:pointer;transition:all .2s ease;object-fit:contain;background:#f8f9fa}.markdown-image:hover{transform:scale(1.02);box-shadow:0 4px 16px #00000026}.image-error{padding:16px;background:#f8f9fa;border:2px dashed #dee2e6;border-radius:8px;color:#6c757d;font-size:14px;text-align:center;margin:12px 0}.markdown-paragraph{margin:8px 0!important;line-height:1.5!important}.message-text p{margin:1px 0!important;line-height:1.3!important}.message-text p:first-child{margin-top:0!important}.message-text p:last-child{margin-bottom:0!important}.message-text>div>*{margin-top:0!important;margin-bottom:3px!important}.message-text>div>*:first-child{margin-top:0!important}.message-text>div>*:last-child{margin-bottom:0!important}.message-text hr{border:none;height:2px;background:linear-gradient(to right,transparent,var(--gray-200),transparent);margin:8px 0!important;border-radius:1px}.message-text{word-break:break-word;overflow-wrap:break-word}.message-text .markdown-list .markdown-list{margin:4px 0}.message-text>*:first-child{margin-top:0!important}.message-text>*:last-child{margin-bottom:0!important}.message-text h1+p,.message-text h2+p,.message-text h3+p{margin-top:2px!important}.message-text p+h1,.message-text p+h2,.message-text p+h3{margin-top:6px!important}.message-text h1,.message-text h2,.message-text h3,.message-text h4,.message-text h5,.message-text h6{margin-top:6px!important;margin-bottom:3px!important}.message-text h1:first-child,.message-text h2:first-child,.message-text h3:first-child{margin-top:0!important}.message-text ul,.message-text ol{margin:4px 0!important;padding-left:20px}.message-text li{margin:1px 0!important}.message-text pre,.message-text blockquote,.message-text table{margin:6px 0!important}.message-text div,.message-text span,.message-text section{margin:0!important;padding:0}.message-text *+*{margin-top:2px!important}.message-text h1+*,.message-text h2+*,.message-text h3+*{margin-top:1px!important}.message-text *+h1,.message-text *+h2,.message-text *+h3{margin-top:6px!important}.message-text ul,.message-text ol{margin:2px 0!important;padding-left:16px!important}.message-text ul>li,.message-text ol>li{margin:0!important;padding:0!important;line-height:1.2!important}.message-text li>p{margin:0!important;display:inline!important}.message-text table{margin:4px 0!important;border-collapse:collapse!important}.message-text thead,.message-text tbody,.message-text tr{margin:0!important;padding:0!important}.message-text th,.message-text td{margin:0!important;padding:4px 8px!important;line-height:1.2!important}.message-text pre{background-color:#f8f9fa!important;border:1px solid #e9ecef!important;border-radius:4px!important;margin:6px 0!important;padding:8px!important}.message-text code{background-color:#f1f3f4!important;padding:1px 4px!important;border-radius:3px!important;font-size:.9em!important}.message-text pre code{background-color:transparent!important;padding:0!important}.message-text blockquote>*{margin:1px 0!important}.message-search-results{margin-top:12px}.research-steps{background:linear-gradient(135deg,#f8f9fa,#e9ecef);border:1px solid #dee2e6;border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 2px 8px #0000000d}.research-steps-header{display:flex;align-items:center;gap:8px;font-weight:600;color:#495057;margin-bottom:12px;font-size:14px}.research-steps-list{display:flex;flex-direction:column;gap:8px}.research-step{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:8px;transition:all .3s ease}.research-step.thinking{background:#0d6efd1a;border-left:3px solid #0d6efd}.research-step.completed{background:#1987541a;border-left:3px solid #198754}.step-indicator{flex-shrink:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:12px;font-weight:700}.thinking-spinner{color:#0d6efd;animation:spin 1s linear infinite}.completed-check{color:#198754;background:#19875433;border-radius:50%;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.step-content{flex:1}.step-description{font-size:13px;color:#495057;font-weight:500}.step-details{font-size:11px;color:#6c757d;margin-top:2px}.intermediate-steps{background:var(--gradient-brand-to-amethyst);border:1px solid #3b82f6;border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 2px 8px #3b82f61a}.intermediate-steps-header{display:flex;align-items:center;gap:8px;font-weight:600;color:#1e40af;margin-bottom:12px;font-size:14px}.intermediate-steps-list{display:flex;flex-direction:column;gap:16px}.intermediate-step{background:#fff;border:1px solid var(--gray-200);border-radius:8px;padding:16px;box-shadow:0 1px 3px #0000001a}.step-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--gray-200)}.step-action{font-weight:600;color:var(--gray-700);font-size:14px}.step-number{background:#3b82f6;color:#fff;padding:2px 8px;border-radius:12px;font-size:12px;font-weight:500}.step-input,.step-output{margin-bottom:12px}.step-input:last-child,.step-output:last-child{margin-bottom:0}.step-label{font-weight:600;color:var(--gray-700);font-size:13px;margin-bottom:6px}.step-code{background:var(--neutral-100);border:1px solid #d1d5db;border-radius:6px;padding:12px;overflow-x:auto}.step-code pre{margin:0;padding:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;color:var(--gray-700);white-space:pre-wrap;word-wrap:break-word}.step-result{background:#f9fafb;border:1px solid #d1d5db;border-radius:6px;padding:12px;overflow-x:auto}.step-text-output{margin:0;padding:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;color:var(--gray-700);white-space:pre-wrap;word-wrap:break-word}.step-image{text-align:center;padding:8px}.step-image img{max-width:100%;height:auto;border-radius:6px;box-shadow:0 2px 8px #0000001a}.step-outputs-list{display:flex;flex-direction:column;gap:12px}.step-output-item{background:#fff;border:1px solid var(--gray-200);border-radius:6px;padding:12px;position:relative}.output-separator{width:100%;height:1px;background:linear-gradient(90deg,transparent 0%,#d1d5db 50%,transparent 100%);margin:8px 0}.step-output-item .step-text-output{background:transparent;border:none;padding:0;margin:0}.step-output-item .step-image{padding:4px}.message-sources{background:linear-gradient(135deg,#fff,#f8f9fa);border:1px solid #e9ecef;border-radius:12px;padding:16px;margin-top:16px;box-shadow:0 2px 8px #0000000d}.sources-header{display:flex;align-items:center;gap:8px;font-weight:600;color:#495057;margin-bottom:12px;font-size:14px}.sources-list{display:flex;flex-direction:column;gap:8px}.source-item{display:flex;align-items:center;gap:12px;padding:12px;background:#fff;border:1px solid #e9ecef;border-radius:8px;transition:all .3s ease;cursor:pointer}.source-item:hover{background:#f8f9fa;border-color:#dee2e6;transform:translateY(-1px);box-shadow:0 2px 8px #0000001a}.source-icon{flex-shrink:0;color:#0d6efd;background:#0d6efd1a;width:28px;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center}.source-content{flex:1;min-width:0}.source-title{font-size:13px;font-weight:600;color:#212529;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-url{font-size:11px;color:#6c757d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-url a{color:inherit;text-decoration:none}.source-url a:hover{color:#0d6efd;text-decoration:underline}.source-action{flex-shrink:0;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.source-action:hover{color:#0d6efd;background:#0d6efd1a}@media(max-width:768px){.research-steps,.message-sources,.intermediate-steps{margin-left:-10px;margin-right:-10px;border-radius:8px}.research-step,.source-item{padding:10px}.intermediate-step{padding:12px}.step-code,.step-result{padding:8px}.step-code pre,.step-text-output{font-size:11px}.source-title{font-size:12px}.source-url{font-size:10px}}.markdown-link-badge{display:inline-block;color:#1d4ed8;background:linear-gradient(135deg,#dbeafe,#bfdbfe);border:1px solid #93c5fd;border-radius:8px;padding:2px 8px;margin:0 3px;cursor:pointer;text-decoration:none;font-size:.85em;font-weight:600;transition:all .2s ease;box-shadow:0 1px 3px #2563eb26;vertical-align:baseline}.markdown-link-badge:hover{background:linear-gradient(135deg,#bfdbfe,#93c5fd);border-color:#60a5fa;transform:translateY(-1px);box-shadow:0 3px 8px #2563eb40;color:#1e40af}.message.user .markdown-link-badge{color:#b0e0e6;background:linear-gradient(135deg,#fff3,#ffffff26);border-color:#87ceeb80}.message.user .markdown-link-badge:hover{background:linear-gradient(135deg,#ffffff4d,#ffffff40);border-color:#87ceebb3;color:#e0f6ff}.markdown-link-simple{color:#2563eb;text-decoration:underline;text-decoration-color:#2563eb66}.markdown-link-simple:hover{text-decoration-color:#2563ebcc}.message.user .markdown-link-simple{color:#87ceeb;text-decoration-color:#87ceeb66}.message.user .markdown-link-simple:hover{text-decoration-color:#87ceebcc}.markdown-link-number{color:#2563eb;text-decoration:none;font-weight:600;background:#2563eb1a;padding:1px 4px;border-radius:3px;border:1px solid rgba(37,99,235,.2);transition:all .2s ease}.markdown-link-number:hover{background:#2563eb33;border-color:#2563eb66}.message.user .markdown-link-number{color:#87ceeb;background:#ffffff1a;border-color:#87ceeb4d}.message.user .markdown-link-number:hover{background:#fff3;border-color:#87ceeb80}@media(prefers-reduced-motion:reduce){.gradient-text.animated{animation:none;background-position:50% 50%}}.suggestion-card{background:#fff;border:1px solid var(--gray-200);border-radius:16px;padding:24px;text-align:left;cursor:pointer;transition:all .3s ease;box-shadow:0 4px 6px #0000000d;position:relative;overflow:hidden}.suggestion-card:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-brand-to-amethyst);transform:translateY(-4px);transition:transform .3s ease}.suggestion-card:hover{border-color:transparent;box-shadow:0 12px 24px #667eea26;transform:translateY(-4px)}.suggestion-card:hover:before{transform:translateY(0)}.suggestion-icon{width:48px;height:48px;border-radius:12px;background:var(--gradient-brand-to-amethyst);display:flex;align-items:center;justify-content:center;color:#fff;margin-bottom:16px;transition:all .3s ease}.suggestion-icon:hover{rotate:-10deg}.suggestion-card h3{margin:0 0 8px;font-size:18px;font-weight:600;color:var(--gray-700)}.suggestion-card p{margin:0;font-size:14px;color:var(--gray-600);line-height:1.5}@media(prefers-color-scheme:dark){.modern-chat{background:linear-gradient(135deg,#1e293b,#0f172a)}.chat-main{background:#1e293b}.chat-header{background:linear-gradient(135deg,#334155,#475569);border-bottom-color:#475569;color:#fff}.chat-header h1{color:#fff}.message.assistant .message-text{background:linear-gradient(135deg,var(--gray-700) 0%,#4b5563 100%);color:#fff;border-color:var(--gray-600)}.welcome-screen h2{color:#fff}.suggestion-card{background:var(--gray-700);border-color:var(--gray-600);color:#fff}.suggestion-card h3{color:#fff}.input-wrapper{background:var(--gray-700);border-color:var(--gray-600)}.message-input{color:#fff}.input-container{background:#1e293b;border-top-color:#475569}}@media(prefers-reduced-motion:reduce){.suggestion-card,.suggestion-icon{transition:none}}.search-results-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;margin:16px 0;max-width:100%}.search-result-card{background:#fff;border:1px solid #e1e5e9;border-radius:8px;overflow:hidden;box-shadow:0 2px 4px #0000001a;transition:box-shadow .3s ease,transform .3s ease;transform:translateY(0);will-change:transform}.search-result-card:hover{box-shadow:0 4px 8px #00000026;transform:translateY(-2px)}.search-result-preview{width:100%;height:200px;overflow:hidden;background:#f8f9fa;display:flex;align-items:center;justify-content:center}.search-result-preview img{max-width:100%;max-height:100%;object-fit:contain}.search-result-info{padding:12px}.search-result-info h4{margin:0 0 8px;font-size:14px;font-weight:600;color:var(--gray-800);word-break:break-word}.search-result-info p{margin:4px 0;font-size:12px;color:var(--gray-600);line-height:1.4}.search-result-info code{background:var(--neutral-100);padding:1px 4px;border-radius:3px;font-size:11px;word-break:break-all}.search-result-actions{display:flex;gap:8px;margin-top:12px}.btn-preview,.btn-download{flex:1;padding:6px 12px;text-decoration:none;text-align:center;border-radius:4px;font-size:12px;font-weight:500;transition:background-color .2s ease;display:inline-block;border:none;cursor:pointer}.btn-preview{background:#3b82f6;color:#fff}.btn-preview:hover{background:#2563eb}.btn-download{background:#10b981;color:#fff}.btn-download:hover{background:#059669}@media(max-width:768px){.search-results-grid{grid-template-columns:1fr;gap:12px}.search-result-preview{height:150px}}.scroll-to-bottom-btn{position:fixed;bottom:160px;left:50%;transform:translate(-50%);width:48px;height:48px;background:linear-gradient(135deg,var(--brand) 0%,var(--amethyst) 100%);color:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 3px 10px #667eea4d;display:flex;align-items:center;justify-content:center;transition:all .3s ease;z-index:1000;opacity:.7}.modern-chat:has(.sidebar.open) .scroll-to-bottom-btn{left:calc(50% + (var(--sidebar-width, 280px) / 2))}.scroll-to-bottom-btn:hover,.scroll-to-bottom-btn:focus{opacity:1;transform:translate(-50%) translateY(-2px);box-shadow:0 5px 16px #667eea66}.scroll-to-bottom-btn:active{transform:translate(-50%) translateY(0);box-shadow:0 3px 8px #667eea4d}.scroll-to-bottom-btn svg.icon{display:block;animation:gentle-bounce 3s ease-in-out infinite}@keyframes gentle-bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-3.5px)}}@media(max-width:768px){.scroll-to-bottom-btn{bottom:140px;width:44px;height:44px}.modern-chat:has(.sidebar.open) .scroll-to-bottom-btn{left:50%}}.badge-selector{position:relative;z-index:1}.badge-selector:has(.badge-dropdown){z-index:10001}.badge{display:flex;align-items:center;gap:6px;background:var(--gradient-brand-to-amethyst);color:#fff;border:none;padding:8px 12px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;box-shadow:0 2px 4px #0000001a}.badge:hover{transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.badge-dropdown{position:absolute;bottom:100%;left:0;background:#fff;border:1px solid var(--gray-200);border-radius:12px;box-shadow:0 8px 24px #00000026;padding:8px;min-width:200px;z-index:10000;animation:fadeInUp .2s ease;margin-bottom:8px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.badge-option{position:relative;width:100%;display:flex;align-items:center;gap:8px;background:none;border:none;padding:10px 12px;border-radius:8px;font-size:13px;color:var(--gray-700);cursor:pointer;transition:all .2s ease;text-align:left;overflow:hidden}.badge-option:hover:not(.active),.badge-option:focus:not(.active){background:#667eea1a;color:var(--brand)}.badge-option.active{background:var(--gradient-brand-to-amethyst);color:#fff}.badge-option.active:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--gradient-amethyst-to-brand);opacity:0;transition:opacity .4s ease;border-radius:8px}.badge-option.active:hover:before,.badge-option.active:focus:before{opacity:1}.badge-option>*{position:relative;z-index:1}@media(max-width:768px){.badge{padding:6px 10px;font-size:11px}.badge-dropdown{min-width:180px}}:root{--bg-primary: #ffffff;--bg-secondary: #f8f9fa;--bg-tertiary: #f3f6fb;--text-secondary: #4b5563;--border-strong: #d1d5db;--primary: #3b82f6;--primary-600: #2563eb;--brand: #667eea;--brand-600: #5a67d8;--amethyst: #764ba2;--neutral-100: #f3f4f6;--gray-200: #e5e7eb;--gray-400: #9ca3af;--gray-600: #6b7280;--gray-700: #374151;--gray-800: #1f2937;--red-50: #fef2f2;--red-100: #fee2e2;--red-200: #fecaca;--red-300: #fca5a5;--red-400: #f87171;--red-600: #dc2626;--red-800: #991b1b;--dashes: #cbd5e1;--focus-ring: rgba(59, 130, 246, .1);--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--fz-xs: .85rem;--fz-sm: .9rem;--fz-base: 1rem;--gap-xs: 6px;--gap-sm: 8px;--gap-md: 10px;--gap-lg: 12px;--gap-xl: 16px;--gap-2xl: 20px;--gap-3xl: 24px;--gradient-brand-to-amethyst: linear-gradient(135deg, var(--brand) 0%, var(--amethyst) 100%);--gradient-amethyst-to-brand: linear-gradient(135deg, var(--amethyst) 0%, var(--brand) 100%)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;background:#00000080;animation:modal-fade-in .12s ease-out}.modal-panel{position:relative;width:100%;max-height:90vh;background:#fff;border-radius:12px;box-shadow:0 10px 30px #0003;display:flex;flex-direction:column;overflow:hidden;outline:none;transform:translateY(0);animation:modal-zoom-in .14s ease-out}.modal-inner-panel{border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:var(--gap-xl);margin-bottom:var(--gap-2xl);background:linear-gradient(135deg,#f8fafc,var(--bg-secondary))}.modal-inner-panel.stats{display:flex;align-items:center;gap:24px;padding:12px 14px;margin-bottom:var(--gap-xl);border-radius:12px;flex-wrap:wrap}.size-sm{max-width:384px}.size-smd{max-width:512px}.size-md{max-width:640px}.size-lg{max-width:768px}.size-xl{max-width:1024px}.size-full{max-width:96vw;max-height:96vh;border-radius:10px}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #eee}.modal-title{margin:0;font-size:20px;font-weight:600;color:var(--gray-800);display:flex;align-items:center;gap:var(--gap-lg)}.modal-body h4{display:flex;align-items:center;gap:var(--gap-sm);margin:0 0 var(--gap-xl) 0;font-size:var(--fz-base);font-weight:600;font-size:1.1rem;color:var(--gray-700);padding-bottom:calc(var(--gap-lg) - 6px);border-bottom:1px solid var(--gray-200)}.modal-close-btn{border:0;background:transparent;padding:6px;border-radius:6px;cursor:pointer}.modal-close-btn:hover{background:var(--neutral-100)}.modal-close-btn:focus-visible{outline:2px solid var(--primary);box-shadow:0 0 0 3px var(--focus-ring)}.modal-close-btn.is-disabled{opacity:.5;cursor:not-allowed}.modal-body,.modal-body-full{padding:16px;overflow:auto;flex:1}.modal-footer{padding:6px 16px;border-top:1px solid #eee;display:flex;align-items:center;justify-content:flex-start;gap:8px;background:#fff;margin:0;padding-block:var(--gap-lg);padding-inline:var(--gap-xl)}:where(.modal-action-btn){--btn-bg: var(--bg-primary);--btn-color: var(--gray-600);--btn-border: var(--border-strong);--btn-bg-hover: #f9fafb;--btn-border-hover: var(--gray-400);--btn-shadow-hover: rgba(59, 130, 246, .3);--btn-color-hover: var(--btn-color);--btn-outline-focus: var(--primary);--btn-focus-ring: var(--focus-ring);--btn-bg-disabled: #f3f4f6;--btn-color-disabled: #9ca3af;--btn-border-disabled: #e5e7eb;display:inline-flex;align-items:center;justify-content:center;gap:var(--gap-lg);padding:8px 16px;min-width:44px;height:44px;font-size:var(--fz-xs);font-weight:500;line-height:1;border-radius:var(--radius-md);border:1px solid var(--btn-border);background:var(--btn-bg);color:var(--btn-color);cursor:pointer;transition:all .2s ease;will-change:transform}:where(.modal-action-btn):not(:disabled):hover,:where(.modal-action-btn):focus-visible{background:var(--btn-bg-hover);border-color:var(--btn-border-hover);color:var(--btn-color-hover);transform:translateY(-1px);box-shadow:0 4px 12px var(--btn-shadow-hover);outline:none}:where(.modal-action-btn).primary{position:relative;overflow:hidden;background:var(--gradient-brand-to-amethyst);color:#fff;border:none;z-index:0}:where(.modal-action-btn).primary:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--gradient-amethyst-to-brand);opacity:0;transition:opacity .3s ease;z-index:-1}:where(.modal-action-btn).primary:hover:before,:where(.modal-action-btn).primary:focus-visible:before{opacity:1}:where(.modal-action-btn).primary:hover,:where(.modal-action-btn).primary:focus-visible{box-shadow:0 4px 12px #667eea66}:where(.modal-action-btn):is(:disabled,[aria-disabled=true]){background:var(--btn-bg-disabled);color:var(--btn-color-disabled);border-color:var(--btn-border-disabled);cursor:not-allowed;box-shadow:none;transform:translateY(0)}:where(.modal-action-btn):active{transform:translateY(0);box-shadow:none}.primary{--btn-bg: var(--gradient-brand-to-amethyst);--btn-color: white;--btn-border: transparent;--btn-shadow: 0 4px 12px rgba(102, 126, 234, .3);--btn-bg-hover: var(--gradient-brand-to-amethyst);--btn-color-hover: white;--btn-border-hover: transparent;--btn-shadow-hover: 0 6px 16px rgba(102, 126, 234, .4);--btn-bg-disabled: linear-gradient(135deg, #c7d2fe, #ddd6fe);--btn-color-disabled: #e0e7ff;--btn-border-disabled: transparent}.secondary{--btn-bg: #f8fafc;--btn-color: var(--gray-700);--btn-border: var(--gray-200);--btn-shadow: none;--btn-bg-hover: var(--gray-200);--btn-color-hover: var(--gray-800);--btn-border-hover: #d1d5db;--btn-shadow-hover: none;--btn-bg-disabled: #f9fafb;--btn-color-disabled: #d1d5db;--btn-border-disabled: #e5e7eb}.danger{--btn-bg: var(--red-100);--btn-color: var(--red-600);--btn-border: var(--red-300);--btn-bg-hover: var(--red-200);--btn-color-hover: var(--red-800);--btn-border-hover: var(--red-400);--btn-bg-disabled: var(--red-50);--btn-color-disabled: var(--red-300);--btn-border-disabled: var(--red-300)}.logout{--btn-bg: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);--btn-color: white;--btn-border: transparent;--btn-bg-hover: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);--btn-color-hover: white;--btn-border-hover: transparent;--btn-shadow-hover: rgba(239, 68, 68, .4);--btn-bg-disabled: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);--btn-color-disabled: #fee2e2;--btn-border-disabled: transparent;height:40px;min-width:40px;border-radius:20px;border:none}.logout:not(:disabled):not([aria-disabled=true]):hover,.logout:focus-visible{filter:drop-shadow(0 0 8px var(--btn-shadow-hover))}.saveSettings{--btn-bg: var(--primary);--btn-color: #fff;--btn-border: var(--primary);--btn-bg-hover: var(--primary-600);--btn-color-hover: #fff;--btn-border-hover: var(--primary-600);--btn-shadow-hover: rgba(59, 130, 246, .3);--btn-bg-disabled: var(--primary-200, #bfdbfe);--btn-color-disabled: var(--primary-400, #93c5fd);--btn-border-disabled: var(--primary-200, #bfdbfe)}.reset{--btn-bg: var(--neutral-100);--btn-color: var(--gray-700);--btn-border: var(--border-strong);--btn-bg-hover: var(--gray-200);--btn-color-hover: var(--gray-700);--btn-border-hover: var(--gray-400);--btn-shadow-hover: rgba(156, 163, 175, .3);--btn-bg-disabled: var(--gray-100);--btn-color-disabled: var(--gray-400);--btn-border-disabled: var(--gray-300)}.reset.outline{--btn-bg: var(--bg-primary);--btn-color: #b91c1c;--btn-border: #fca5a5;--btn-bg-hover: #fff1f2;--btn-color-hover: #991b1b;--btn-border-hover: #ef4444;--btn-shadow-hover: rgba(239, 68, 68, .2);--btn-bg-disabled: var(--bg-primary);--btn-color-disabled: #fca5a5;--btn-border-disabled: #fecaca}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-zoom-in{0%{transform:translateY(4px);opacity:.98}to{transform:translateY(0);opacity:1}}@media(max-width:640px){.modal-action-btn{width:100%}}.profile-section{text-align:center;padding:24px;border-bottom:1px solid var(--gray-200);margin-bottom:24px}.profile-avatar{width:80px;height:80px;border-radius:50%;background:var(--gradient-brand-to-amethyst);display:flex;align-items:center;justify-content:center;color:#fff;margin:0 auto 16px}.profile-section h4{margin:0 0 8px;font-size:20px;color:var(--gray-700);display:block;border:none}.profile-section p{margin:0;color:var(--gray-600);font-size:14px}.profile-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;margin-bottom:24px}.profile-actions{display:flex;text-align:center;align-items:center;gap:var(--gap-lg);width:100%}.settings-container{display:flex;flex-direction:column;gap:var(--gap-xl);padding:0}.setting-item{display:flex;flex-direction:column;padding:8px 0}.setting-item:last-child{margin-bottom:0}.setting-item label{display:flex;align-items:center;gap:var(--gap-lg);font-size:var(--fz-sm);font-weight:500;color:var(--gray-700);cursor:pointer}.select-wrapper{position:relative;width:100%}.select-wrapper select,.setting-item select{width:100%;min-width:200px;padding:8px 12px;font-size:14px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-primary);color:#111827;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.select-wrapper select:hover,.setting-item select:hover{border-color:var(--gray-400)}.select-wrapper select:focus,.setting-item select:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px var(--focus-ring)}.setting-item input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:var(--brand, #6366f1)}.setting-item.aligned{display:grid;grid-template-columns:1fr min(360px,60vw);align-items:center;column-gap:var(--gap-xl);width:100%}.setting-item.aligned>label{margin:0;text-align:left;white-space:nowrap;color:var(--text-secondary)}.setting-item.aligned .select-wrapper{justify-self:end;width:100%}.setting-item.aligned .select-wrapper select{display:block;width:100%}@media(max-width:560px){.setting-item.aligned{grid-template-columns:1fr;row-gap:var(--gap-sm)}.setting-item.aligned .select-wrapper{justify-self:stretch}}.settings-actions{display:flex;align-items:center;gap:var(--gap-sm);justify-content:center;width:100%}.settings-actions.end{justify-content:flex-end}.settings-actions.split{justify-content:space-between}.settings-actions.split .group{display:flex;align-items:center;gap:var(--gap-sm)}@media(max-width:640px){.settings-actions{flex-direction:column}.settings-actions.split{flex-direction:column;align-items:stretch;gap:var(--gap-sm)}.settings-actions.split .group{justify-content:stretch}}.checkbox-item{display:flex;align-items:flex-start}.checkbox-label{display:flex;align-items:center;gap:var(--gap-md, 12px);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;font-weight:400;color:var(--gray-700, #374151);padding:12px;margin:0;border-radius:8px;transition:all .2s ease}.checkbox-label:hover,.checkbox-label:focus-within{background:#667eea13}.checkbox-label input[type=checkbox]{position:absolute;opacity:0;width:0;height:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none;outline:none}.checkbox-custom{position:relative;flex-shrink:0;width:20px;height:20px;border:2px solid var(--border-strong, #d1d5db);border-radius:4px;background:#fff;transition:all .2s ease}.checkbox-label:hover .checkbox-custom{border-color:var(--gray-400, #9ca3af);box-shadow:0 0 0 3px var(--focus-ring, rgba(102,126,234,.35))}.checkbox-label input[type=checkbox]:checked+.checkbox-custom{background:var(--primary, var(--brand, #6366f1));border-color:var(--primary, var(--brand, #6366f1))}.checkbox-label input[type=checkbox]:checked+.checkbox-custom:after{content:"";position:absolute;left:6px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.checkbox-text{font-weight:600}.checkbox-description{font-size:13px;font-weight:400;line-height:1.45;color:var(--gray-500, #6b7280)}.checkbox-label:has(input[type=checkbox]:disabled){cursor:not-allowed;opacity:.6}.checkbox-label:has(input[type=checkbox]:disabled):hover,.checkbox-label:has(input[type=checkbox]:disabled):focus-within{background:transparent}.checkbox-label input[type=checkbox]:disabled+.checkbox-custom{background:var(--gray-100, #f3f4f6);border-color:var(--gray-300, #d1d5db);cursor:not-allowed}.checkbox-label:has(input[type=checkbox]:disabled):hover .checkbox-custom{border-color:var(--gray-300, #d1d5db);box-shadow:none}.checkbox-label input[type=checkbox]:disabled:checked+.checkbox-custom{background:var(--gray-400, #9ca3af);border-color:var(--gray-400, #9ca3af)}.checkbox-label:has(input[type=checkbox]:disabled) .checkbox-text{color:var(--gray-400, #9ca3af)}.checkbox-label:has(input[type=checkbox]:disabled) .checkbox-description{color:var(--gray-400, #9ca3af)}.source-preview-image{text-align:center;margin-bottom:1rem}.source-preview-image img{max-width:100%;max-height:600px;border-radius:8px;border:1px solid var(--gray-200);box-shadow:0 2px 8px #0000001a}.text-preview-content{max-height:600px;overflow:auto;margin-bottom:1rem;background:#f8fafc;border:1px solid var(--gray-200);border-radius:8px;padding:0}.text-content-display{margin:0;padding:1.5rem;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:.9rem;line-height:1.6;color:#1e293b;white-space:pre-wrap;word-wrap:break-word;background:#fff;border-radius:8px;overflow-x:auto}.text-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;min-height:200px;padding:2rem}.text-loading .spinner{width:40px;height:40px;border:3px solid var(--gray-200);border-top-color:var(--brand);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.text-loading p{color:var(--gray-600);margin:0}.text-error{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;min-height:200px;padding:2rem;text-align:center}.text-error svg{color:var(--gray-400);opacity:.7}.text-error p{color:var(--gray-600);margin:0}.source-preview-error{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;text-align:center;min-height:300px}.source-preview-error .error-icon{color:var(--gray-400);opacity:.7}.source-preview-error h4{margin:0;color:var(--gray-700);font-size:1.1rem}.source-preview-error p{color:var(--gray-600);margin:0}.source-preview-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;text-align:center;min-height:300px}.source-preview-placeholder .placeholder-icon{color:var(--gray-400);opacity:.5}.source-preview-placeholder p{color:var(--gray-600);margin:0}.source-info-text{display:flex;flex-direction:column;gap:.25rem;font-size:.9rem;color:var(--gray-600)}.source-info-text p{margin:0}.source-file-info{text-align:center;font-size:.9rem;color:var(--gray-600);line-height:1.6;display:flex;flex-direction:column;gap:.5rem}.source-file-info strong{color:var(--gray-700)}.source-file-info .upload-date{font-size:.85rem;color:var(--gray-500);font-style:italic;margin-top:.25rem}@media(max-width:768px){.source-preview-image img{max-height:400px}.source-preview-error,.source-preview-placeholder{min-height:250px;padding:2rem}.source-preview-footer.split{flex-direction:column;gap:8px}.source-preview-footer.split .group{width:100%;justify-content:stretch}.source-preview-footer.split .group button{flex:1}}.upload-zone-full{display:flex;align-items:center;gap:20px;padding:24px;border:2px dashed var(--dashes);border-radius:12px;cursor:pointer;transition:all .3s ease;background:#fff;margin:10px}.upload-zone-full:hover,.upload-zone-full:focus{border-color:var(--brand);background:#f8fafc;transform:translateY(-2px);box-shadow:0 8px 25px #667eea26}.upload-zone-full.dragging{border-color:var(--brand);background:linear-gradient(135deg,#f0f4ff,#e8f0fe);border-style:solid;border-width:3px;transform:scale(1.02);box-shadow:0 12px 35px #667eea40}.upload-zone-full.dragging .upload-icon-large{transform:scale(1.1);animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%,to{transform:scale(1.1);opacity:1}50%{transform:scale(1.15);opacity:.8}}.upload-zone-full.disabled{pointer-events:none;opacity:.65;filter:grayscale(10%)}.upload-spinner{margin-top:8px;width:18px;height:18px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:fm-spin .8s linear infinite}@keyframes fm-spin{to{transform:rotate(360deg)}}.upload-icon-large{width:64px;height:64px;background:var(--gradient-brand-to-amethyst);border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 4px 15px #667eea4d;flex-shrink:0}.upload-content{flex:1}.upload-main-text{font-size:1.1rem;font-weight:600;color:#1e293b;margin:0 0 6px}.upload-subtitle{color:var(--gray-600);font-size:.9rem;line-height:1.4}.upload-area-inline{margin-bottom:24px;padding-bottom:20px;border-bottom:2px solid var(--gray-200)}.upload-zone-compact{display:flex;align-items:center;gap:16px;padding:20px;border:2px dashed #d1d5db;border-radius:12px;cursor:pointer;transition:all .2s ease;background:#f9fafb}.upload-zone-compact:hover{border-color:var(--brand);background:var(--neutral-100);transform:translateY(-1px)}.upload-icon{width:48px;height:48px;background:var(--gradient-brand-to-amethyst);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 4px 12px #667eea4d}.upload-text{flex:1;display:flex;flex-direction:column;gap:4px}.files-header{display:flex;justify-content:space-between;align-items:center}.view-controls{display:flex;gap:8px}.view-btn{display:flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid #d1d5db;border-radius:8px;background:#fff;color:var(--gray-600);cursor:pointer;transition:all .2s ease;font-size:.85rem}.view-btn:hover{border-color:var(--brand);color:var(--brand)}.view-btn.active{background:var(--brand);border-color:var(--brand);color:#fff}.file-container{transition:all .3s ease;width:100%;box-sizing:border-box}.file-grid-enhanced{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:8px 0;max-width:100%}.file-list-enhanced{display:flex;flex-direction:column;gap:8px;padding:8px 0}.file-preview{position:relative;display:flex;align-items:center;justify-content:center;height:50px;flex-shrink:0;margin-bottom:8px}.file-card{background:#fff;border:2px solid var(--gray-200);border-radius:12px;padding:12px;transition:all .2s ease;position:relative;box-shadow:0 2px 4px #0000000d;height:140px;display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.file-card .file-preview{display:none}.file-row{background:#fff;border:1px solid var(--gray-200);border-radius:8px;padding:12px 16px;transition:all .2s ease;position:relative;box-shadow:0 1px 2px #0000000d;display:flex;align-items:center;gap:12px;transform:translateY(0)}.file-row .file-preview{height:40px;width:40px;margin-bottom:0}.file-row .file-icon-large{font-size:1.5rem}.file-row .file-type-badge{top:-4px;right:-4px;font-size:.6rem;padding:1px 4px}.file-row .file-info-detailed{flex:1;margin-bottom:0}.file-row .file-name-full{margin-bottom:2px;font-size:.9rem}.file-row .file-meta-detailed{font-size:.7rem}.file-row .file-actions-enhanced{flex-shrink:0}.file-card:hover,.file-card:focus-within,.file-row:hover{border-color:var(--brand);transform:translateY(-2px);box-shadow:0 8px 16px #0000001a}.file-icon{font-size:1.6rem;width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:var(--gradient-brand-to-amethyst);border-radius:10px;color:#fff;box-shadow:0 2px 8px #667eea4d}.file-icon.small{font-size:1.2rem;flex-shrink:0}.file-icon.large{font-size:2rem;opacity:.8}.file-type-badge{position:absolute;top:-4px;right:-4px;background:var(--brand);color:#fff;font-size:.6rem;padding:2px 4px;border-radius:3px;font-weight:600;box-shadow:0 1px 3px #0000001a;z-index:1}.file-header{display:flex;align-items:center;gap:8px;margin-bottom:8px;min-height:20px}.file-status-badge{background:var(--neutral-100);padding:2px 6px;border-radius:4px;font-size:.65rem;font-weight:500;border:1px solid var(--gray-200);flex-shrink:0;white-space:nowrap}.file-status-badge[data-status=indexed]{background:#d1fae5;color:#065f46;border-color:#a7f3d0}.file-status-badge[data-status=indexing],.file-status-badge[data-status=staging]{background:#fef3c7;color:#92400e;border-color:#fde68a}.file-status-badge[data-status=error]{background:#fee2e2;color:#991b1b;border-color:#fecaca}.file-status-badge[data-status=empty]{background:#e5e7eb;color:#374151;border-color:#d1d5db}.file-date{color:var(--gray-600);font-weight:400;font-size:.8rem}.file-date.small{font-size:.65rem}.file-date-badge{color:var(--gray-600);font-weight:400;font-size:.8rem;background:#f8fafc;padding:2px 6px;border-radius:4px;margin-left:auto;flex-shrink:0}.file-name-truncated{font-size:.9rem;font-weight:600;color:var(--gray-800);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.file-size-info{font-size:.75rem;color:var(--gray-600);background:#f8fafc;padding:2px 6px;border-radius:4px;align-self:center}.file-actions-enhanced{display:flex;gap:6px;justify-content:center;margin-top:auto}.truncate-1line{display:inline-block;max-width:30ch;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}.search-container{display:flex;gap:8px;position:relative;margin-bottom:24px}.search-input{flex:1;width:100%;padding:14px 44px 14px 18px;border:2px solid #d1d5db;border-radius:12px;background:#fff;color:var(--gray-800);font-size:1rem;outline:none;transition:all .2s ease;box-shadow:0 2px 4px #0000000d}.search-input:focus{border-color:var(--brand);box-shadow:0 0 0 4px #667eea26;transform:translateY(-1px)}.search-icon{position:absolute;right:16px;top:50%;transform:translateY(-50%);color:var(--gray-600);transition:color .2s ease}.search-input:focus+.search-icon{color:var(--brand)}.chat-category{margin-bottom:28px}.category-header{font-size:1.2rem;font-weight:700;color:var(--brand);margin-bottom:16px;padding-bottom:10px;border-bottom:3px solid var(--brand);display:flex;align-items:center;gap:10px}.chat-list{display:flex;flex-direction:column;gap:10px}.chat-history-result{padding:16px;background:#f9fafb;border:2px solid var(--gray-200);border-radius:12px;cursor:pointer;transition:all .2s ease;position:relative;box-shadow:0 2px 4px #0000000d;display:flex;justify-content:space-between;align-items:flex-start}.chat-history-result:hover,.chat-history-result:focus-within{border-color:var(--brand);transform:translateY(-2px);box-shadow:0 8px 16px #0000001a;outline:none}.chat-history-result:has(.chat-info:focus-visible){background:var(--neutral-100);box-shadow:0 0 0 3px var(--focus-ring)}.chat-history-result:hover .chat-actions,.chat-history-result:focus-within .chat-actions{opacity:1}.chat-history-result.loading{opacity:.6;pointer-events:none;cursor:wait}.chat-history-result.loading:after{content:"";position:absolute;top:50%;right:12px;width:16px;height:16px;border:2px solid #f3f3f3;border-top:2px solid var(--primary-color);border-radius:50%;animation:spin 1s linear infinite;transform:translateY(-50%)}.chat-info{flex:1;cursor:pointer;display:flex;flex-direction:column;gap:6px}.chat-title{font-size:1rem;font-weight:600;color:var(--gray-800);margin:0}.chat-description{font-size:.9rem;color:var(--gray-600);margin:0;line-height:1.4}.chat-meta{display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:var(--gray-600);margin-top:4px}.message-count{background:var(--brand);color:#fff;padding:2px 8px;border-radius:12px;font-size:.75rem;font-weight:500}.chat-date{font-style:italic;color:var(--gray-400)}.chat-actions{display:flex;gap:8px;opacity:0;transition:opacity .2s ease}.chat-history-results{max-height:500px;overflow-y:auto;padding-right:4px}.chat-history-results::-webkit-scrollbar{width:6px}.chat-history-results::-webkit-scrollbar-track{background:var(--neutral-100);border-radius:3px}.chat-history-results::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}.chat-history-results::-webkit-scrollbar-thumb:hover{background:var(--gray-400)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preview-modal-content{display:flex;align-items:center;justify-content:center;min-height:400px;padding:0;overflow:auto}.preview-modal-image{max-width:100%;max-height:70vh;object-fit:contain;display:block;margin:0 auto}.preview-modal-error{padding:40px;text-align:center;color:var(--gray-600);font-size:18px}@media(max-width:768px){.preview-modal-content{min-height:300px}.preview-modal-image{max-height:60vh}.preview-modal-error{padding:30px 20px;font-size:16px}}
