.report-modal-backdrop{position:fixed;inset:0;background-color:#0f172aa6;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:9999;padding:24px;animation:fadeIn .2s ease-out}.report-modal-content{background:var(--sidebar, #ffffff);color:var(--text, #0f172a);width:95vw;max-width:1350px;height:90vh;max-height:900px;border-radius:20px;box-shadow:0 25px 50px -12px #00000059;display:flex;flex-direction:column;border:1px solid var(--border, #e2e8f0);overflow:hidden}body.dark .report-modal-content{background:#111827;color:#f8fafc;border-color:#1f2937}.report-modal-header{padding:18px 28px;border-bottom:1px solid var(--border, #e2e8f0);display:flex;align-items:center;justify-content:space-between;background:#00000005}body.dark .report-modal-header{border-bottom-color:#1f2937;background:#ffffff05}.report-header-title{display:flex;align-items:center;gap:12px}.report-icon{font-size:24px}.report-header-title h2{margin:0;font-size:18px;font-weight:700;color:var(--text, #0f172a)}body.dark .report-header-title h2{color:#f8fafc}.report-close-btn{background:transparent;border:none;font-size:20px;color:#64748b;cursor:pointer;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.report-close-btn:hover{background:#00000014;color:#0f172a}body.dark .report-close-btn:hover{background:#ffffff1a;color:#fff}.report-filter-bar{padding:16px 28px;background:#00000003;border-bottom:1px solid var(--border, #e2e8f0);display:flex;flex-wrap:wrap;align-items:center;gap:16px}body.dark .report-filter-bar{background:#ffffff03;border-bottom-color:#1f2937}.filter-group{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500}.filter-group label{color:#64748b;white-space:nowrap}body.dark .filter-group label{color:#94a3b8}.date-group input[type=date]{padding:8px 12px;border-radius:10px;border:1px solid var(--border, #cbd5e1);background:var(--sidebar, #ffffff);color:var(--text, #0f172a);font-size:14px;outline:none;transition:border-color .2s ease}body.dark .date-group input[type=date]{background:#1e293b;border-color:#334155;color:#f8fafc}.date-group input[type=date]:focus{border-color:#2563eb}.search-group{flex:1;min-width:250px}.search-input-wrapper{position:relative;width:100%;display:flex;align-items:center}.search-input-wrapper input{width:100%;padding:8px 36px 8px 14px;border-radius:10px;border:1px solid var(--border, #cbd5e1);background:var(--sidebar, #ffffff);color:var(--text, #0f172a);font-size:14px;outline:none;transition:border-color .2s ease}body.dark .search-input-wrapper input{background:#1e293b;border-color:#334155;color:#f8fafc}.search-input-wrapper input:focus{border-color:#2563eb}.clear-search-btn{position:absolute;right:10px;background:none;border:none;color:#94a3b8;cursor:pointer;font-size:14px;padding:2px 6px}.filter-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.btn-reset{padding:8px 14px;border-radius:10px;border:1px solid var(--border, #cbd5e1);background:transparent;color:#64748b;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s ease}.btn-reset:hover{background:#0000000d;color:#0f172a}body.dark .btn-reset{border-color:#334155;color:#94a3b8}body.dark .btn-reset:hover{background:#ffffff0d;color:#fff}.btn-export-excel{padding:9px 18px;border-radius:10px;border:none;background:linear-gradient(135deg,#10b981,#059669);color:#fff;font-size:14px;font-weight:600;cursor:pointer;box-shadow:0 4px 12px #10b98140;transition:all .2s ease;display:flex;align-items:center;gap:6px}.btn-export-excel:hover:not(:disabled){background:linear-gradient(135deg,#059669,#047857);transform:translateY(-1px);box-shadow:0 6px 16px #10b98159}.btn-export-excel:disabled{opacity:.5;cursor:not-allowed}.report-table-wrapper{flex:1;overflow:auto;position:relative;background:var(--bg, #f8fafc)}body.dark .report-table-wrapper{background:#0f172a}.report-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13.5px;color:var(--text, #0f172a)}body.dark .report-table{color:#e2e8f0}.report-table th{position:sticky;top:0;z-index:10;background:#f1f5f9;color:#475569;font-weight:700;font-size:13px;padding:12px 14px;border-bottom:2px solid var(--border, #cbd5e1);-webkit-user-select:none;user-select:none;white-space:nowrap}body.dark .report-table th{background:#1e293b;color:#94a3b8;border-bottom-color:#334155}.sortable-th{cursor:pointer;transition:background .2s ease}.sortable-th:hover{background:#e2e8f0;color:#1e293b}body.dark .sortable-th:hover{background:#334155;color:#f8fafc}.sort-icon{margin-left:6px;font-weight:700;display:inline-block}.sort-icon.inactive{opacity:.3}.sort-icon.active{color:#2563eb;opacity:1}body.dark .sort-icon.active{color:#60a5fa}.report-table td{padding:12px 14px;border-bottom:1px solid var(--border, #e2e8f0);vertical-align:top}body.dark .report-table td{border-bottom-color:#1f2937}.report-table tbody tr{transition:background .15s ease}.report-table tbody tr:hover{background:#2563eb0a}body.dark .report-table tbody tr:hover{background:#3b82f614}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.font-semibold{font-weight:600}.text-title{color:#1e40af;max-width:220px;word-break:break-word}body.dark .text-title{color:#93c5fd}.role-badge{display:inline-block;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600;line-height:1}.role-badge.user{background:#dbeafe;color:#1e40af}body.dark .role-badge.user{background:#3b82f633;color:#93c5fd}.role-badge.assistant{background:#f1f5f9;color:#475569;border:1px solid #cbd5e1}body.dark .role-badge.assistant{background:#ffffff14;color:#cbd5e1;border-color:#334155}.content-cell{max-width:450px}.content-text{max-height:120px;overflow-y:auto;white-space:pre-wrap;word-break:break-word;line-height:1.5;font-size:13px;padding-right:6px}.time-cell{color:#64748b;white-space:nowrap}body.dark .time-cell{color:#94a3b8}.table-loading,.table-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#64748b;gap:12px}.empty-icon{font-size:42px}.spinner{width:32px;height:32px;border:3px solid rgba(37,99,235,.2);border-top-color:#2563eb;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.report-footer{padding:14px 28px;border-top:1px solid var(--border, #e2e8f0);display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;background:#00000005}body.dark .report-footer{border-top-color:#1f2937;background:#ffffff05}.rows-per-page-selector{display:flex;align-items:center;gap:10px;font-size:13.5px;color:#64748b}body.dark .rows-per-page-selector{color:#94a3b8}.rows-per-page-selector select{padding:6px 10px;border-radius:8px;border:1px solid var(--border, #cbd5e1);background:var(--sidebar, #ffffff);color:var(--text, #0f172a);font-size:13.5px;outline:none;cursor:pointer}body.dark .rows-per-page-selector select{background:#1e293b;border-color:#334155;color:#f8fafc}.total-info strong{color:var(--text, #0f172a)}body.dark .total-info strong{color:#f8fafc}.pagination-controls{display:flex;align-items:center;gap:6px}.page-btn,.page-num-btn{padding:6px 12px;border-radius:8px;border:1px solid var(--border, #cbd5e1);background:var(--sidebar, #ffffff);color:var(--text, #0f172a);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease}body.dark .page-btn,body.dark .page-num-btn{background:#1e293b;border-color:#334155;color:#f8fafc}.page-btn:hover:not(:disabled),.page-num-btn:hover:not(.active){background:#f1f5f9;border-color:#94a3b8}body.dark .page-btn:hover:not(:disabled),body.dark .page-num-btn:hover:not(.active){background:#334155;border-color:#475569}.page-num-btn.active{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:700}.page-btn:disabled{opacity:.4;cursor:not-allowed}.report-pwd-backdrop{position:fixed;inset:0;background-color:#0f172ab3;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:10000;padding:20px;animation:fadeIn .2s ease-out}.report-pwd-modal{background:var(--sidebar, #ffffff);color:var(--text, #0f172a);width:100%;max-width:440px;border-radius:16px;box-shadow:0 25px 50px -12px #0006;border:1px solid var(--border, #e2e8f0);overflow:hidden;animation:modalScaleUp .2s ease-out}body.dark .report-pwd-modal{background:#111827;color:#f8fafc;border-color:#1f2937}@keyframes modalScaleUp{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.report-pwd-header{padding:16px 20px;border-bottom:1px solid var(--border, #e2e8f0);display:flex;align-items:center;justify-content:space-between;background:#00000005}body.dark .report-pwd-header{border-bottom-color:#1f2937;background:#ffffff05}.pwd-title-box{display:flex;align-items:center;gap:10px}.pwd-icon{font-size:20px}.pwd-title-box h3{margin:0;font-size:16px;font-weight:700}.pwd-close-btn{background:transparent;border:none;font-size:18px;color:#64748b;cursor:pointer;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.pwd-close-btn:hover{background:#00000014}body.dark .pwd-close-btn:hover{background:#ffffff1a;color:#fff}.report-pwd-form{padding:20px;display:flex;flex-direction:column;gap:16px}.pwd-desc{margin:0;font-size:13.5px;color:#64748b;line-height:1.5}body.dark .pwd-desc{color:#94a3b8}.pwd-input-group input{width:100%;padding:11px 14px;border-radius:10px;border:1px solid var(--border, #cbd5e1);background:var(--sidebar, #ffffff);color:var(--text, #0f172a);font-size:14px;outline:none;box-sizing:border-box;transition:border-color .2s ease}body.dark .pwd-input-group input{background:#1e293b;border-color:#334155;color:#f8fafc}.pwd-input-group input:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb26}.pwd-error{font-size:13px;color:#ef4444;font-weight:500}.pwd-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:4px}.btn-pwd-cancel{padding:9px 16px;border-radius:10px;border:1px solid var(--border, #cbd5e1);background:transparent;color:#64748b;font-size:13.5px;font-weight:600;cursor:pointer;transition:all .2s ease}.btn-pwd-cancel:hover{background:#0000000d}body.dark .btn-pwd-cancel{border-color:#334155;color:#94a3b8}body.dark .btn-pwd-cancel:hover{background:#ffffff0d;color:#fff}.btn-pwd-submit{padding:9px 18px;border-radius:10px;border:none;background:#2563eb;color:#fff;font-size:13.5px;font-weight:600;cursor:pointer;transition:all .2s ease}.btn-pwd-submit:hover:not(:disabled){background:#1d4ed8}.btn-pwd-submit:disabled{opacity:.6;cursor:not-allowed}:root{--bg: #f8fafc;--sidebar: #ffffff;--text: #0f172a;--border: #e5e7eb;--ai: #f1f5f9;--user: #2563eb}body.dark{--bg: #0f172a;--sidebar: #111827;--text: #f8fafc;--border: #1f2937;--ai: #1e293b;--user: #3b82f6}html,body,#root{height:100%;margin:0}body{font-family:system-ui,sans-serif;background:var(--bg);color:var(--text)}.app{display:flex;height:100vh}.layout{display:flex;width:100%}.sidebar{position:fixed;top:0;left:0;height:100vh;width:260px;overflow-y:auto;background:var(--sidebar);border-right:1px solid var(--border);padding:16px;z-index:100}.new-chat-btn{width:100%;padding:10px;border-radius:12px;border:none;background:#2563eb;color:#fff;cursor:pointer;margin-bottom:8px;font-weight:600;transition:all .2s ease}.report-nav-btn{width:100%;padding:10px;border-radius:12px;border:1px solid var(--border);background:#2563eb14;color:#2563eb;cursor:pointer;margin-bottom:16px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s ease}.report-nav-btn:hover{background:#2563eb29;transform:translateY(-1px)}body.dark .report-nav-btn{background:#3b82f626;color:#60a5fa;border-color:#1e293b}body.dark .report-nav-btn:hover{background:#3b82f640}.chat-item{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:10px;cursor:pointer;margin-bottom:6px;position:relative;transition:.2s}.chat-item:hover{background:#f1f5f9;transform:translate(2px)}.chat-item.active{background:#2563eb;color:#fff}body.dark .chat-item:hover{background:#1e293b}.chat-left{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-right{display:flex;align-items:center;position:relative}.menu-trigger{opacity:0;cursor:pointer;padding:6px 10px;border-radius:8px;transition:all .2s ease}.chat-item:hover .menu-trigger,.chat-item.active-menu .menu-trigger{opacity:1}.menu-trigger:hover{background:#00000014}body.dark .menu-trigger:hover{background:#ffffff1a}.menu-dropdown{position:absolute;right:0;top:34px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 10px 30px #00000026;z-index:9999;overflow:hidden;min-width:150px;animation:fadeIn .15s ease}body.dark .menu-dropdown{background:#1e293b}.menu-item{padding:10px 14px;cursor:pointer;font-size:14px;display:flex;align-items:center;gap:8px;transition:.2s}.menu-item:hover{background:#f1f5f9}body.dark .menu-item:hover{background:#334155}.menu-item.delete{color:#ef4444}.menu-item.delete:hover{background:#fee2e2}body.dark .menu-item.delete:hover{background:#ef444426}.main{margin-left:260px;flex:1;display:flex;flex-direction:column;min-height:100vh;width:calc(100% - 260px)}.header{position:sticky;top:0;z-index:10;background:var(--bg);width:100%;max-width:1000px;margin:0 auto;padding:0 24px 10px;height:60px;display:flex;align-items:center;font-weight:600;border-bottom:1px solid var(--border)}.chat-area{width:100%;max-width:100%;display:flex;flex-direction:column}.messages{flex:1;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:40px 20px;gap:20px}.bubble-wrapper{width:100%;max-width:1000px;display:flex}.bubble-wrapper.user{justify-content:flex-end}.bubble-wrapper.assistant{justify-content:flex-start}.user-bubble,.ai-bubble{padding:16px 20px;border-radius:10px;line-height:1.6;font-size:15px;max-width:100%;box-shadow:0 4px 12px #0000000d}.user-bubble{max-width:80%;margin-left:auto;background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;text-align:right}.ai-bubble{background:var(--ai)}.input-container{position:sticky;bottom:0;background:var(--bg);padding:20px 0 20px 40px;display:flex;justify-content:center;border-radius:16px}.input-box{width:100%;max-width:1200px;display:flex;align-items:flex-end;gap:8px;border:1px solid var(--border);border-radius:16px;padding:8px 12px;background:var(--bg);position:relative;justify-content:center}textarea{flex:1;border:none;outline:none;resize:none;background:transparent;min-height:24px;max-height:250px;overflow-y:auto;font-size:15px;line-height:1.5;padding:4px 0;color:var(--text)}.send-btn{flex-shrink:0;width:36px;height:36px;border-radius:50%;border:none;background:#2563eb;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}.input-inner{position:relative;width:100%;max-width:800px}.empty{margin-top:120px;text-align:center;opacity:.6}.typing span{width:6px;height:6px;background:#999;border-radius:50%;margin-right:4px;display:inline-block;animation:blink 1.4s infinite}@keyframes blink{0%,80%,to{opacity:.2}40%{opacity:1}}@keyframes fadeIn{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.chat-item.active-menu{background:#f1f5f9}.chat-right{position:relative;padding-bottom:10px}.menu-floating{position:fixed;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 30px #0003;z-index:9999;min-width:150px;overflow:hidden;animation:fadeIn .15s ease}body.dark .menu-floating{background:#1e293b}.menu-floating .menu-item{padding:10px 14px;cursor:pointer;font-size:14px;display:flex;gap:8px;align-items:center;line-height:1}.menu-floating .menu-item span.icon{width:16px;text-align:center;font-size:14px;flex-shrink:0}.menu-floating .menu-item:hover{background:#f1f5f9}body.dark .menu-floating .menu-item:hover{background:#334155}.menu-floating .delete{color:#ef4444}.send-row{display:flex;justify-content:flex-end;margin-top:8px}.textarea-wrapper{position:relative;width:100%}.ai-bubble{line-height:1.7}.ai-bubble h3{margin-top:16px;margin-bottom:8px;font-size:16px;font-weight:600}.ai-bubble strong{font-weight:600;color:#1d4ed8}.ai-bubble em{color:#475569}.ai-bubble ul{padding-left:20px;margin:8px 0}.ai-bubble li{margin-bottom:6px}.ai-bubble code{background:#e2e8f0;padding:2px 6px;border-radius:6px;font-size:13px}.ai-bubble blockquote{border-left:3px solid #2563eb;padding-left:10px;color:#475569;margin:10px 0}.ai-bubble p strong:first-child{display:inline-block;margin-top:12px}
