@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";*{box-sizing:border-box;margin:0;padding:0}body{color:#0f172a;-webkit-font-smoothing:antialiased;background:#f0f4f8;font-family:Inter,Segoe UI,system-ui,-apple-system,sans-serif}header{color:#fff;z-index:100;background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 50%,#1d4ed8 100%);align-items:center;gap:.75rem;padding:.65rem 2rem;display:flex;position:sticky;top:0;box-shadow:0 4px 24px #0f172a59}header .logo{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#ffffff1f;border:1px solid #ffffff2e;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;transition:transform .2s;display:flex}header .logo:hover{transform:scale(1.05)}header .logo svg{stroke:#fff}header h1{color:#fff;letter-spacing:-.03em;font-size:1.15rem;font-weight:800}header small{color:#ffffff8c;letter-spacing:.01em;font-size:.72rem;font-weight:400}.container{grid-template-columns:340px 1fr;gap:1rem;max-width:1440px;min-height:calc(100vh - 60px);margin:0 auto;padding:1rem;display:grid}.sidebar{flex-direction:column;gap:.75rem;display:flex}.card{background:#fff;border:1px solid #e2e8f0b3;border-radius:18px;padding:1.25rem;transition:box-shadow .25s,border-color .25s,transform .15s;box-shadow:0 1px 3px #0000000a,0 4px 12px #00000005}.card:hover{border-color:#c7d2de;box-shadow:0 8px 24px #0000000f}.card-chat{flex-direction:column;height:calc(100vh - 82px);display:flex;position:sticky;top:72px;overflow:hidden}h2{color:#64748b;text-transform:uppercase;letter-spacing:.08em;align-items:center;gap:.4rem;margin-bottom:.8rem;font-size:.72rem;font-weight:700;display:flex}h2 .icon{font-size:.9rem}.stats-grid{grid-template-columns:1fr 1fr;gap:.5rem;display:grid}.stat{text-align:center;border:1px solid #0000;border-radius:14px;padding:.85rem .7rem;transition:transform .2s,box-shadow .2s;position:relative;overflow:hidden}.stat:before{content:"";opacity:0;border-radius:14px 14px 0 0;height:3px;transition:opacity .2s;position:absolute;top:0;left:0;right:0}.stat:hover{transform:translateY(-3px);box-shadow:0 8px 20px #00000012}.stat:hover:before{opacity:1}.stat:first-child{background:#eff6ff;border-color:#dbeafe}.stat:first-child:before{background:#2563eb}.stat:nth-child(2){background:#fffbeb;border-color:#fef3c7}.stat:nth-child(2):before{background:#f59e0b}.stat:nth-child(3){background:#f0fdf4;border-color:#dcfce7}.stat:nth-child(3):before{background:#22c55e}.stat:nth-child(4){background:#fef2f2;border-color:#fecaca}.stat:nth-child(4):before{background:#ef4444}.stat .val{font-size:1.6rem;font-weight:800;line-height:1.2}.stat .lbl{color:#64748b;letter-spacing:.02em;margin-top:4px;font-size:.67rem;font-weight:500}.chat-header{border-bottom:1px solid #f1f5f9;align-items:center;gap:.65rem;margin-bottom:.6rem;padding-bottom:.65rem;display:flex}.chat-header .avatar{background:linear-gradient(135deg,#2563eb,#7c3aed);border-radius:14px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:1.2rem;display:flex;box-shadow:0 3px 12px #2563eb4d}.chat-header h2{text-transform:none;letter-spacing:-.02em;color:#0f172a;margin-bottom:0;font-size:.95rem;font-weight:800}.chat-header .status{color:#22c55e;align-items:center;gap:.3rem;font-size:.68rem;font-weight:600;display:flex}.chat-header .status:before{content:"";background:#22c55e;border-radius:50%;width:7px;height:7px;animation:2s ease-in-out infinite pulse-dot;display:inline-block}@keyframes pulse-dot{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.85)}}.chat-box{scroll-behavior:smooth;background:linear-gradient(#f8fafc 0%,#f1f5f9 100%);border:1px solid #e2e8f0;border-radius:14px;flex:1;margin-bottom:.6rem;padding:1rem;overflow-y:auto}.chat-box::-webkit-scrollbar{width:5px}.chat-box::-webkit-scrollbar-track{background:0 0}.chat-box::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}.chat-box::-webkit-scrollbar-thumb:hover{background:#94a3b8}.msg{margin-bottom:.75rem;animation:.35s cubic-bezier(.16,1,.3,1) slideIn;display:flex}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.msg.user{justify-content:flex-end}.msg.bot{justify-content:flex-start}.bubble{word-wrap:break-word;white-space:pre-line;border-radius:20px;max-width:80%;padding:.65rem .95rem;font-size:.85rem;line-height:1.6;display:inline-block}.msg.user .bubble{color:#fff;background:linear-gradient(135deg,#2563eb 0%,#4f46e5 100%);border-bottom-right-radius:6px;box-shadow:0 3px 12px #2563eb40}.msg.bot .bubble{color:#1e293b;background:#fff;border:1px solid #e2e8f0;border-bottom-left-radius:6px;box-shadow:0 2px 8px #00000008}.sql-toggle{color:#64748b;cursor:pointer;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;align-items:center;gap:.3rem;margin-top:.5rem;padding:.2rem .55rem;font-family:inherit;font-size:.68rem;font-weight:600;transition:all .15s;display:inline-flex}.sql-toggle:hover{color:#334155;background:#e2e8f0}.sql-preview{color:#93c5fd;white-space:pre-wrap;background:#0f172a;border:1px solid #1e293b;border-radius:10px;margin-top:.5rem;padding:.7rem .9rem;font-family:SF Mono,Fira Code,Cascadia Code,Courier New,monospace;font-size:.72rem;line-height:1.55;animation:.25s slideIn}.chat-input{align-items:center;gap:.45rem;display:flex}.chat-input.listening .input-wrapper{background:#fef2f2;border-color:#ef4444;box-shadow:0 0 0 3px #ef44441f,0 0 20px #ef444414}.input-wrapper{background:#f8fafc;border:2px solid #e2e8f0;border-radius:16px;flex:1;align-items:center;transition:all .25s;display:flex;overflow:hidden}.input-wrapper:focus-within{background:#fff;border-color:#2563eb;box-shadow:0 0 0 4px #2563eb14}.chat-input input{background:0 0;border:none;outline:none;flex:1;min-width:0;padding:.75rem .95rem;font-family:inherit;font-size:.87rem}.chat-input input::placeholder{color:#94a3b8}.btn-mic{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:38px;height:38px;margin-right:4px;transition:all .2s;display:flex}.btn-mic:hover{color:#475569;background:#f1f5f9}.btn-mic.active{color:#ef4444;background:#fef2f2;animation:1.5s ease-in-out infinite pulse-mic}@keyframes pulse-mic{0%,to{box-shadow:0 0 #ef444440}50%{box-shadow:0 0 0 10px #ef444400}}.btn-mic.transcribing{color:#2563eb;background:#eff6ff}.btn-mic:disabled{opacity:.3;cursor:not-allowed}.spinner{animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.btn-send{color:#fff;cursor:pointer;background:linear-gradient(135deg,#2563eb,#4f46e5);border:none;border-radius:16px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;transition:all .2s;display:flex;box-shadow:0 3px 12px #2563eb4d}.btn-send:hover:not(:disabled){background:linear-gradient(135deg,#1d4ed8,#4338ca);transform:translateY(-2px);box-shadow:0 6px 20px #2563eb66}.btn-send:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 8px #2563eb40}.btn-send:disabled{opacity:.3;cursor:not-allowed;box-shadow:none;transform:none}.suggestions{flex-wrap:wrap;gap:.35rem;margin-bottom:.65rem;display:flex}.suggestions button{color:#475569;cursor:pointer;background:#fff;border:1px solid #e2e8f0;border-radius:12px;align-items:center;gap:.3rem;padding:.35rem .7rem;font-family:inherit;font-size:.73rem;font-weight:500;transition:all .2s;display:flex;box-shadow:0 1px 2px #00000005}.suggestions button .sug-icon{font-size:.78rem}.suggestions button:hover{color:#fff;background:linear-gradient(135deg,#2563eb,#4f46e5);border-color:#0000;transform:translateY(-2px);box-shadow:0 4px 14px #2563eb40}.results{border:1px solid #e2e8f0;border-radius:14px;overflow-x:auto}.results table{border-collapse:collapse;width:100%;font-size:.78rem}.results th{color:#cbd5e1;text-align:left;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;background:linear-gradient(135deg,#0f172a,#1e293b);padding:.6rem .7rem;font-size:.68rem;font-weight:600}.results th:first-child{border-top-left-radius:13px}.results th:last-child{border-top-right-radius:13px}.results td{color:#334155;border-bottom:1px solid #f1f5f9;padding:.55rem .7rem}.results tr:last-child td{border-bottom:none}.results tr:hover td{background:#eff6ff}.results tr:nth-child(2n) td{background:#fafbfc}.results tr:nth-child(2n):hover td{background:#eff6ff}.results tr{transition:background .1s}.badge{letter-spacing:.02em;border-radius:20px;align-items:center;padding:3px 10px;font-size:.68rem;font-weight:600;display:inline-flex}.badge-green{color:#15803d;background:#dcfce7}.badge-orange{color:#b45309;background:#fef3c7}.badge-red{color:#dc2626;background:#fee2e2}.history-header{justify-content:space-between;align-items:center;margin-bottom:.5rem;display:flex}.history-item{cursor:pointer;border-bottom:1px solid #f1f5f9;border-radius:10px;padding:.6rem .65rem;font-size:.8rem;transition:all .15s}.history-item:last-child{border-bottom:none}.history-item:hover{background:#f0f7ff;transform:translate(2px)}.history-item .question{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-weight:500;overflow:hidden}.history-item .meta{color:#94a3b8;align-items:center;gap:.4rem;margin-top:3px;font-size:.68rem;display:flex}.history-item .meta .source-badge{text-transform:uppercase;color:#64748b;background:#f1f5f9;border-radius:6px;padding:1px 7px;font-size:.6rem;font-weight:700}.btn-clear{color:#dc2626;cursor:pointer;background:0 0;border:1px solid #fecaca;border-radius:8px;padding:.2rem .65rem;font-family:inherit;font-size:.7rem;font-weight:600;transition:all .15s}.btn-clear:hover{background:#fef2f2;border-color:#fca5a5}.loading{color:#94a3b8;text-align:center;padding:1.2rem;font-size:.8rem}.empty-state{text-align:center;color:#94a3b8;padding:1.8rem 1rem}.empty-state .icon{opacity:.35;margin-bottom:.5rem;font-size:2rem}.empty-state p{font-size:.8rem}.typing-indicator{background:#fff;border:1px solid #e2e8f0;border-radius:20px 20px 20px 6px;align-items:center;gap:5px;width:fit-content;padding:.7rem 1.1rem;display:flex;box-shadow:0 2px 8px #00000008}.typing-indicator span{background:#94a3b8;border-radius:50%;width:7px;height:7px;animation:1.4s ease-in-out infinite bounce}.typing-indicator span:first-child{animation-delay:0s}.typing-indicator span:nth-child(2){animation-delay:.2s}.typing-indicator span:nth-child(3){animation-delay:.4s}@keyframes bounce{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-6px)}}.results-section{max-height:260px;margin-top:.6rem;animation:.3s slideIn;overflow-y:auto}.results-section::-webkit-scrollbar{width:5px}.results-section::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}.welcome-msg{text-align:center;color:#64748b;padding:2rem 1rem}.welcome-msg .welcome-icon{margin-bottom:.8rem;font-size:2.5rem;display:block}.welcome-msg h3{color:#1e293b;margin-bottom:.3rem;font-size:1rem;font-weight:700}.welcome-msg p{max-width:380px;margin:0 auto;font-size:.82rem;line-height:1.5}@media (width<=960px){.container{grid-template-columns:1fr;padding:.6rem}.card-chat{height:75vh;position:static}.sidebar{order:2}header{padding:.65rem 1rem}}@media (width<=480px){.suggestions button{padding:.25rem .5rem;font-size:.7rem}.stats-grid{gap:.35rem}.stat .val{font-size:1.3rem}.stat{padding:.6rem .5rem}.card{border-radius:14px;padding:1rem}.bubble{max-width:90%;font-size:.82rem}}
