@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";:root{--primary:#ff8562;--primary-hover:#e86e4c;--primary-soft:#ff85621a;--bg:#f6f5f2;--bg-card:#fff;--text:#171717;--text-muted:#7a7a7a;--error:#e8493f;--success:#2e9e5b;--border:#e9e7e2;--shadow-sm:0 2px 10px #1717170a;--shadow-lg:0 18px 50px #17171714}*{box-sizing:border-box;margin:0;padding:0}body{background-color:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;overflow-x:hidden}.app-container{flex-direction:column;min-height:100vh;display:flex;position:relative}.background-shapes{z-index:-1;width:100vw;height:100vh;position:fixed;top:0;left:0;overflow:hidden}.shape{filter:blur(90px);opacity:.5;border-radius:50%;animation:26s ease-in-out infinite alternate float;position:absolute}.shape-1{background:#ffe3d8;width:500px;height:500px;top:-140px;left:-140px}.shape-2{background:#e8efff;width:560px;height:560px;animation-delay:-7s;bottom:-180px;right:-140px}.shape-3{opacity:.55;background:#fff0e4;width:360px;height:360px;animation-delay:-14s;top:38%;left:32%}@keyframes float{0%{transform:translate(0)scale(1)}33%{transform:translate(36px,-54px)scale(1.08)}66%{transform:translate(-24px,24px)scale(.94)}to{transform:translate(0)scale(1)}}.content{flex-direction:column;flex:1;gap:2rem;width:100%;max-width:960px;margin:0 auto;padding:3.5rem 1.5rem 5rem;display:flex}.app-header{text-align:center;padding:1.5rem 0 .5rem}.app-header h1{letter-spacing:-.02em;color:var(--text);font-size:3.25rem;font-weight:800;line-height:1.05}.app-header p{color:var(--text-muted);margin-top:1rem;font-size:1.15rem;line-height:1.55}.tab-bar{flex-wrap:wrap;justify-content:center;gap:.5rem;display:flex}.tab{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:999px;padding:.7rem 1.4rem;font-size:.95rem;font-weight:600;transition:all .2s}.tab:hover{color:var(--text);background:#1717170d}.tab.active{background:var(--text);color:#fff}.view{flex-direction:column;gap:1.25rem;display:flex}.search-bar{gap:.75rem;display:flex}.search-bar input,.chat-input input,.add-channel-form input,.admin-form input,.admin-token input{background:var(--bg-card);border:1px solid var(--border);color:var(--text);box-shadow:var(--shadow-sm);border-radius:.9rem;outline:none;flex:1;padding:.95rem 1.15rem;font-size:1rem;transition:border-color .2s,box-shadow .2s}.search-bar input:focus,.chat-input input:focus,.add-channel-form input:focus,.admin-form input:focus,.admin-token input:focus{border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-soft)}.search-bar input::placeholder,.chat-input input::placeholder,.add-channel-form input::placeholder,.admin-form input::placeholder,.admin-token input::placeholder{color:#b3b0a9}button{font-family:inherit}button:disabled{opacity:.5;cursor:not-allowed}.search-bar button,.chat-input button,.add-channel-form button,.admin-form button,.admin-token button,.logout{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:.9rem;padding:.95rem 1.75rem;font-size:1rem;font-weight:600;transition:background .2s,transform .1s}.search-bar button:hover:not(:disabled),.chat-input button:hover:not(:disabled),.add-channel-form button:hover:not(:disabled),.admin-form button:hover:not(:disabled),.admin-token button:hover:not(:disabled),.logout:hover:not(:disabled){background:var(--primary-hover)}.search-bar button:active:not(:disabled),.chat-input button:active:not(:disabled),.add-channel-form button:active:not(:disabled),.admin-form button:active:not(:disabled),.admin-token button:active:not(:disabled),.logout:active:not(:disabled){transform:translateY(1px)}.search-options,.chat-options{justify-content:flex-end;display:flex}.channel-picker{position:relative}.picker-toggle{background:var(--bg-card);border:1px solid var(--border);color:var(--text);cursor:pointer;box-shadow:var(--shadow-sm);border-radius:.9rem;align-items:center;gap:.75rem;padding:.7rem 1.1rem;font-size:.9rem;font-weight:500;transition:border-color .2s;display:flex}.picker-toggle:hover{border-color:var(--primary)}.chevron{color:var(--text-muted);font-size:.7rem}.picker-dropdown{z-index:20;background:var(--bg-card);border:1px solid var(--border);box-shadow:var(--shadow-lg);border-radius:1rem;min-width:300px;max-height:340px;padding:.5rem;position:absolute;top:calc(100% + .5rem);right:0;overflow-y:auto}.picker-item{cursor:pointer;color:var(--text);border-radius:.6rem;align-items:center;gap:.6rem;padding:.55rem .65rem;transition:background .15s;display:flex}.picker-item:hover{background:#f4f3ef}.picker-item input{accent-color:var(--primary)}.picker-label{flex-direction:column;gap:.1rem;display:flex;overflow:hidden}.picker-label strong{white-space:nowrap;text-overflow:ellipsis;font-size:.9rem;overflow:hidden}.picker-label em{color:var(--text-muted);font-size:.78rem;font-style:normal}.picker-note{color:var(--text-muted);padding:.6rem;font-size:.85rem}.analysis-card,.result-item,.add-channel,.chat-panel,.admin-panel{background:var(--bg-card);border:1px solid var(--border);box-shadow:var(--shadow-sm);border-radius:1.25rem;padding:1.5rem}.analysis-card h3,.results h3{margin-bottom:.75rem;font-size:1.05rem}.analysis-card p{color:#4d4d4d;white-space:pre-wrap;line-height:1.7}.results{flex-direction:column;gap:.75rem;display:flex}.results ul{flex-direction:column;gap:.75rem;list-style:none;display:flex}.result-item{flex-direction:column;gap:.5rem;display:flex}.result-meta{flex-wrap:wrap;align-items:center;gap:.75rem;font-size:.85rem;display:flex}.channel-tag{background:var(--primary-soft);color:var(--primary-hover);border-radius:999px;padding:.2rem .65rem;font-weight:600}.date{color:var(--text-muted)}.author{color:var(--text);font-weight:600}.result-meta a{color:var(--primary-hover);font-weight:600;text-decoration:none}.result-meta a:hover{text-decoration:underline}.result-text{color:var(--text);white-space:pre-wrap;line-height:1.7}.add-channel{flex-direction:column;gap:1rem;display:flex}.add-channel h3{font-size:1.15rem}.mode-tabs{flex-wrap:wrap;gap:.5rem;display:flex}.mode-tabs button{border:1px solid var(--border);color:var(--text-muted);cursor:pointer;background:0 0;border-radius:999px;padding:.55rem 1.1rem;font-size:.85rem;font-weight:500;transition:all .2s}.mode-tabs button:hover{color:var(--text);border-color:var(--text-muted)}.mode-tabs button.active{background:var(--text);border-color:var(--text);color:#fff}.add-channel-form{gap:.75rem;display:flex}.dialog-search{flex-direction:column;gap:.75rem;display:flex}.dialog-search input{background:var(--bg-card);border:1px solid var(--border);color:var(--text);box-shadow:var(--shadow-sm);border-radius:.9rem;outline:none;padding:.95rem 1.15rem;font-size:1rem;transition:border-color .2s,box-shadow .2s}.dialog-search input:focus{border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-soft)}.dialog-list{flex-direction:column;gap:.5rem;max-height:340px;display:flex;overflow-y:auto}.dialog-row{border:1px solid var(--border);background:#faf9f6;border-radius:.9rem;justify-content:space-between;align-items:center;gap:.75rem;padding:.75rem .9rem;display:flex}.dialog-info{flex-direction:column;gap:.1rem;display:flex;overflow:hidden}.dialog-info strong{white-space:nowrap;text-overflow:ellipsis;font-size:.9rem;overflow:hidden}.dialog-info em{color:var(--text-muted);font-size:.78rem;font-style:normal}.dialog-row button{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:.75rem;flex-shrink:0;padding:.55rem 1.1rem;font-size:.85rem;font-weight:600;transition:background .2s}.dialog-row button:hover:not(:disabled){background:var(--primary-hover)}.channel-status{flex-direction:column;gap:.75rem;margin-top:1rem;display:flex}.channel-status-header{justify-content:space-between;align-items:center;gap:.5rem;display:flex}.channel-status-header h3{margin:0;font-size:1rem}.status-badge{border:1px solid var(--border);color:var(--text-muted);background:#f4f3ef;border-radius:999px;padding:.25rem .6rem;font-size:.75rem;font-weight:600}.status-badge.processing{color:var(--primary-hover);border-color:var(--primary);background:var(--primary-soft)}.status-dot{vertical-align:middle;background:var(--text-muted);border-radius:50%;width:.5rem;height:.5rem;margin-right:.3rem;display:inline-block}.status-dot.pending{background:var(--text-muted)}.status-dot.processing{background:var(--primary)}.status-dot.completed{background:#2e9e5b}.status-dot.failed{background:#e8493f}.status-error{color:#e8493f;white-space:nowrap;text-overflow:ellipsis;max-width:220px;font-size:.72rem;overflow:hidden}.status-progress{flex-shrink:0;align-items:center;gap:.4rem;display:flex}.status-progress-track{background:#efeee9;border-radius:999px;width:100%;height:6px;overflow:hidden}.status-progress-fill{background:var(--primary);border-radius:999px;height:100%;transition:width .3s}.status-progress-fill.completed{background:#2e9e5b}.status-progress-fill.failed{background:#e8493f}.status-progress-label{color:var(--text-muted);text-align:right;min-width:2rem;font-size:.72rem}.chat-panel{flex-direction:column;gap:1rem;display:flex}.chat-window{flex-direction:column;gap:.75rem;min-height:320px;max-height:55vh;padding:.25rem;display:flex;overflow-y:auto}.chat-empty{color:var(--text-muted);text-align:center;padding:2rem 1rem;font-size:.95rem;line-height:1.6}.chat-suggestions{flex-direction:column;gap:.5rem;padding:.25rem;display:flex}.chat-suggestions-title{text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-size:.75rem;font-weight:700}.chat-suggestions-list{flex-wrap:wrap;gap:.5rem;display:flex}.suggestion-chip{text-align:left;border:1px solid var(--border);color:var(--text);cursor:pointer;background:#faf9f6;border-radius:.9rem;flex-direction:column;align-items:flex-start;gap:.15rem;padding:.7rem 1rem;font-size:.9rem;line-height:1.35;transition:border-color .2s,background .2s;display:flex}.suggestion-chip:hover:not(:disabled){border-color:var(--primary);background:var(--primary-soft)}.suggestion-headline{font-weight:600}.suggestion-channel{color:var(--text-muted);font-size:.75rem}.chat-bubble{white-space:pre-wrap;word-break:break-word;border-radius:1.1rem;max-width:80%;padding:.85rem 1.15rem;line-height:1.6}.chat-bubble.user{background:var(--primary);color:#fff;box-shadow:var(--shadow-sm);border-bottom-right-radius:.3rem;align-self:flex-end}.chat-bubble.model{border:1px solid var(--border);color:var(--text);background:#f4f3ef;border-bottom-left-radius:.3rem;align-self:flex-start}.chat-bubble.typing{color:var(--text-muted)}.chat-message{flex-direction:column;gap:.5rem;display:flex}.chat-sources{flex-direction:column;align-self:flex-start;gap:.5rem;max-width:80%;padding-left:.25rem;display:flex}.chat-sources-title{text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-size:.75rem;font-weight:700}.chat-source-item{border:1px solid var(--border);background:#faf9f6;border-radius:.9rem;flex-direction:column;gap:.3rem;padding:.7rem .85rem;display:flex}.chat-source-meta{flex-wrap:wrap;align-items:center;gap:.6rem;font-size:.78rem;display:flex}.chat-source-text{color:#4d4d4d;white-space:pre-wrap;word-break:break-word;font-size:.85rem;line-height:1.6}.chat-bubble.model p,.chat-bubble.model ul,.chat-bubble.model ol{margin:0 0 .5rem}.chat-bubble.model p:last-child,.chat-bubble.model ul:last-child,.chat-bubble.model ol:last-child{margin-bottom:0}.chat-bubble.model ul,.chat-bubble.model ol{padding-left:1.25rem}.chat-bubble.model li{margin-bottom:.25rem}.chat-bubble.model h1,.chat-bubble.model h2,.chat-bubble.model h3,.chat-bubble.model h4,.chat-bubble.model h5,.chat-bubble.model h6{margin:.75rem 0 .5rem;font-size:1em;font-weight:700}.chat-bubble.model code{background:#17171712;border-radius:.3rem;padding:.1rem .35rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}.chat-bubble.model pre{color:#f6f5f2;background:#171717;border-radius:.6rem;margin:0 0 .5rem;padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85rem;overflow-x:auto}.chat-input{gap:.75rem;display:flex}.admin-panel{flex-direction:column;gap:1rem;display:flex}.admin-panel h2{font-size:1.3rem}.admin-token,.admin-form{flex-wrap:wrap;gap:.75rem;display:flex}.admin-status{color:var(--text-muted);font-size:.95rem}.admin-status strong{color:var(--success)}.admin-status .account{color:var(--text)}.logout{background:var(--error);width:fit-content}.logout:hover:not(:disabled){background:#c53b33}.admin-models{flex-direction:column;gap:.75rem;display:flex}.admin-models h3{font-size:1.05rem}.admin-models button{width:fit-content}.models-table{border-collapse:collapse;width:100%;font-size:.85rem}.models-table th,.models-table td{text-align:left;border-bottom:1px solid var(--border);vertical-align:top;padding:.6rem .75rem}.models-table th{color:var(--text-muted);font-weight:600}.models-table code{color:var(--primary-hover)}.app-footer{justify-content:center;margin-top:auto;padding-top:2rem;display:flex}.footer-link{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:.5rem;padding:.35rem .75rem;font-size:.85rem;font-weight:500;transition:color .2s,background .2s}.footer-link:hover{color:var(--text);background:#1717170d}.consent{color:var(--text-muted);text-align:center;font-size:.85rem;line-height:1.6}.consent-link{color:var(--primary-hover);cursor:pointer;font-size:inherit;background:0 0;border:none;padding:0;font-weight:600;text-decoration:underline}.consent-link:hover{color:var(--primary)}.terms-page{flex-direction:column;gap:1.5rem;display:flex}.terms-back{border:1px solid var(--border);color:var(--text);cursor:pointer;background:0 0;border-radius:999px;align-self:flex-start;padding:.55rem 1.1rem;font-size:.9rem;font-weight:600;transition:background .2s}.terms-back:hover{background:#1717170d}.terms-section{background:var(--bg-card);border:1px solid var(--border);box-shadow:var(--shadow-sm);border-radius:1.25rem;flex-direction:column;gap:.9rem;padding:2rem;display:flex}.terms-section h1{letter-spacing:-.02em;font-size:1.75rem;font-weight:800}.terms-section h2{margin-top:.6rem;font-size:1.1rem;font-weight:700}.terms-section p{color:#4d4d4d;line-height:1.7}.terms-updated{font-size:.85rem;color:var(--text-muted)!important}.terms-divider{border:none;border-top:1px solid var(--border)}.note{border:1px solid var(--border);color:var(--text-muted);background:#faf9f6;border-radius:.9rem;padding:.85rem 1.1rem;font-size:.9rem;line-height:1.6}.note.error{color:#c53b33;background:#e8493f0f;border-color:#e8493f4d}.note.success{color:#237a46;background:#2e9e5b12;border-color:#2e9e5b4d}@media (width<=640px){.app-header h1{font-size:2.25rem}.search-bar,.chat-input,.add-channel-form{flex-direction:column}.chat-bubble{max-width:95%}}
