:root{--color-bg: #f8fafc;--color-surface: #ffffff;--color-surface-hover: #f1f5f9;--color-sidebar: #0f172a;--color-sidebar-hover: #1e293b;--color-sidebar-active: #334155;--color-primary: #3b82f6;--color-primary-hover: #2563eb;--color-primary-light: #dbeafe;--color-text: #1e293b;--color-text-secondary: #64748b;--color-text-muted: #94a3b8;--color-border: #e2e8f0;--color-border-focus: #3b82f6;--color-success: #10b981;--color-success-bg: #d1fae5;--color-warning: #f59e0b;--color-warning-bg: #fef3c7;--color-error: #ef4444;--color-error-bg: #fee2e2;--font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono: "SF Mono", "Fira Code", monospace;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-full: 9999px;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);--shadow-md: 0 4px 12px rgba(0, 0, 0, .08);--shadow-lg: 0 10px 24px rgba(0, 0, 0, .1);--space-xs: .25rem;--space-sm: .5rem;--space-md: 1rem;--space-lg: 1.5rem;--space-xl: 2rem;--space-2xl: 3rem;--transition-fast: .15s ease;--transition-normal: .2s ease;--sidebar-width: 260px}*{box-sizing:border-box}html{font-size:15px}body{margin:0;font-family:var(--font-family);color:var(--color-text);background-color:var(--color-bg);line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:inherit;text-decoration:none}button{font-family:inherit;border:none;background:var(--color-primary);color:#fff;padding:.6rem 1.2rem;border-radius:var(--radius-md);cursor:pointer;font-size:.875rem;font-weight:500;transition:background-color var(--transition-fast),transform var(--transition-fast);display:inline-flex;align-items:center;justify-content:center;gap:.5rem}button:hover{background:var(--color-primary-hover)}button:active{transform:scale(.98)}button:focus-visible{outline:2px solid var(--color-border-focus);outline-offset:2px}button:disabled{opacity:.5;cursor:not-allowed;transform:none}button.secondary{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-border)}button.secondary:hover{background:var(--color-surface-hover);border-color:#cbd5e1}button.ghost{background:transparent;color:var(--color-primary);padding:.5rem .75rem}button.ghost:hover{background:var(--color-primary-light)}button.danger{background:var(--color-error)}button.danger:hover{background:#dc2626}button.success{background:var(--color-success)}button.success:hover{background:#059669}input,select,textarea{width:100%;padding:.65rem .9rem;border-radius:var(--radius-md);border:1px solid var(--color-border);background:var(--color-surface);font-family:inherit;font-size:.875rem;color:var(--color-text);transition:border-color var(--transition-fast),box-shadow var(--transition-fast)}input:hover,select:hover,textarea:hover{border-color:#cbd5e1}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--color-border-focus);box-shadow:0 0 0 3px var(--color-primary-light)}input::placeholder,textarea::placeholder{color:var(--color-text-muted)}input:disabled,select:disabled,textarea:disabled{background:var(--color-bg);cursor:not-allowed}textarea{min-height:100px;resize:vertical}select{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}label{display:block;font-size:.875rem;font-weight:500;color:var(--color-text);margin-bottom:.4rem}.form-group{margin-bottom:1.25rem}.form-hint{font-size:.8rem;color:var(--color-text-secondary);margin-top:.35rem}.form-error{font-size:.8rem;color:var(--color-error);margin-top:.35rem}.dropzone{border:2px dashed var(--color-border);border-radius:var(--radius-lg);padding:1.25rem;background:var(--color-surface);cursor:pointer;transition:border-color var(--transition-fast),background-color var(--transition-fast),box-shadow var(--transition-fast);position:relative}.dropzone:hover{border-color:#cbd5e1;background:var(--color-surface-hover)}.dropzone-active{border-color:var(--color-primary);background:var(--color-primary-light);box-shadow:0 0 0 3px #3b82f633}.dropzone-disabled{background:var(--color-bg);border-color:var(--color-border);cursor:not-allowed;opacity:.7}.dropzone-input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;pointer-events:none}.dropzone-content{display:flex;flex-direction:column;gap:.35rem}.dropzone-title{font-weight:600;color:var(--color-text)}.dropzone-subtitle{font-size:.8rem;color:var(--color-text-secondary)}.dropzone-meta{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.75rem}.progress{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem}.progress-label{font-size:.8rem;color:var(--color-text-secondary)}.progress-track{height:6px;border-radius:var(--radius-full);background:var(--color-border);overflow:hidden}.progress-fill{height:100%;background:var(--color-primary);transition:width var(--transition-fast)}.app-shell{display:grid;grid-template-columns:var(--sidebar-width) 1fr;min-height:100vh}.sidebar{background:var(--color-sidebar);color:#e2e8f0;padding:1.5rem 1rem;display:flex;flex-direction:column;gap:1.5rem;position:sticky;top:0;height:100vh;overflow-y:auto}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:#334155;border-radius:4px}.brand{font-weight:700;font-size:1.25rem;color:#fff;display:flex;align-items:center;gap:.5rem}.brand-icon{width:28px;height:28px;background:var(--color-primary);border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:1rem}.sidebar-subtitle{font-size:.75rem;color:var(--color-text-muted);margin-top:.25rem}.nav{display:flex;flex-direction:column;gap:.25rem}.nav-link{display:flex;align-items:center;gap:.75rem;padding:.65rem .85rem;border-radius:var(--radius-md);color:#94a3b8;font-size:.875rem;font-weight:500;transition:all var(--transition-fast)}.nav-link:hover{background:var(--color-sidebar-hover);color:#e2e8f0}.nav-link.active{background:var(--color-sidebar-active);color:#fff}.nav-icon{width:20px;height:20px;opacity:.7}.nav-link.active .nav-icon,.nav-link:hover .nav-icon{opacity:1}.content{display:flex;flex-direction:column;min-height:100vh}.topbar{background:var(--color-surface);border-bottom:1px solid var(--color-border);padding:1rem 2rem;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:100;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fffffff2}.topbar-left{display:flex;align-items:center;gap:1rem}.topbar-title{font-size:1.1rem;font-weight:600}.topbar-right{display:flex;align-items:center;gap:1rem}.user-info{display:flex;flex-direction:column;align-items:flex-end}.user-name{font-weight:600;font-size:.875rem;color:var(--color-text)}.user-email{font-size:.75rem;color:var(--color-text-secondary)}.avatar{width:36px;height:36px;border-radius:var(--radius-full);background:var(--color-primary-light);color:var(--color-primary);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:.875rem}.main{padding:2rem;flex:1}.page{padding:2rem}.auth-page{min-height:100vh;background:var(--color-bg)}.auth-card{max-width:420px;margin:0 auto;width:100%}.auth-header{text-align:center;margin-bottom:1.5rem}.auth-brand{justify-content:center;margin-bottom:.5rem}.auth-footer-link{font-size:.875rem}.page-header{margin-bottom:2rem}.page-title{font-size:1.75rem;font-weight:700;color:var(--color-text);margin:0 0 .5rem}.page-subtitle{color:var(--color-text-secondary);font-size:.95rem;margin:0}.card{background:var(--color-surface);border-radius:var(--radius-lg);padding:1.5rem;box-shadow:var(--shadow-sm);border:1px solid var(--color-border);transition:box-shadow var(--transition-normal),transform var(--transition-normal)}.card-compact{padding:.75rem 1rem}.card-table{padding:0;overflow:hidden}.card:hover{box-shadow:var(--shadow-md)}.card-clickable:hover{transform:translateY(-2px);cursor:pointer}.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.card-title{font-size:1rem;font-weight:600;margin:0}.card-body{color:var(--color-text-secondary);font-size:.875rem}.section-title{margin:0 0 1.25rem;font-size:1.1rem;font-weight:600;color:var(--color-text)}.section-title-pad{padding:1rem 1.5rem .5rem;margin-bottom:.5rem}.section-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}.section-header .section-title{margin-bottom:0}.tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1.5rem}.tab-button{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-border);padding:.45rem .9rem;border-radius:var(--radius-full);font-size:.85rem;font-weight:500}.tab-button:hover{background:var(--color-surface-hover)}.tab-button.active{background:var(--color-primary-light);border-color:var(--color-primary);color:var(--color-primary)}.alert{padding:.75rem 1rem;border-radius:var(--radius-md);border:1px solid var(--color-border);font-size:.875rem}.alert-block{padding:1rem 1.5rem}.alert-warning{background:var(--color-warning-bg);border-color:var(--color-warning);color:#92400e}.progress-bar{height:6px;border-radius:var(--radius-full);background:var(--color-border);overflow:hidden;margin-top:.5rem}.progress-fill{height:100%;transition:width var(--transition-fast)}.progress-fill-low{background:var(--color-error)}.progress-fill-mid{background:var(--color-warning)}.progress-fill-high{background:var(--color-success)}.filter-bar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.filter-bar .filter-input{flex:1;min-width:200px;max-width:300px}.filter-bar .filter-select{width:auto;min-width:140px}.filter-bar .filter-input-small{width:80px}.upload-bar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:flex-end}.upload-form{display:flex;gap:.5rem;flex:1}.upload-bar .form-group{margin-bottom:0;flex:1;min-width:280px;max-width:400px}.upload-actions{display:flex;flex-direction:column;gap:.5rem;align-items:flex-start}.upload-actions .progress{width:120px}.checkbox-row{display:flex;align-items:center;gap:.5rem}.checkbox-row input[type=checkbox]{width:auto;flex-shrink:0}.checkbox-row label{margin-bottom:0}a.button,.button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:none;font-family:inherit;border:none;background:var(--color-primary);color:#fff;padding:.6rem 1.2rem;border-radius:var(--radius-md);cursor:pointer;font-size:.875rem;font-weight:500;transition:background-color var(--transition-fast),transform var(--transition-fast)}a.button:hover,.button:hover{background:var(--color-primary-hover)}a.button:active,.button:active{transform:scale(.98)}a.button:focus-visible,.button:focus-visible{outline:2px solid var(--color-border-focus);outline-offset:2px}a.button:disabled,.button:disabled{opacity:.5;cursor:not-allowed;transform:none}a.button.secondary,.button.secondary{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-border)}a.button.secondary:hover,.button.secondary:hover{background:var(--color-surface-hover);border-color:#cbd5e1}a.button.ghost,.button.ghost{background:transparent;color:var(--color-primary);padding:.5rem .75rem}a.button.ghost:hover,.button.ghost:hover{background:var(--color-primary-light)}a.button.danger,.button.danger{background:var(--color-error)}a.button.danger:hover,.button.danger:hover{background:#dc2626}.grid{display:grid;gap:1.25rem}.grid-gap-sm{gap:.75rem}.grid.two{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.grid-auto-200{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.grid-span-full{grid-column:1 / -1}.grid.three{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.grid.four{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.form-row{display:flex;gap:.75rem;align-items:center}.form-row>*{flex:1}.list{display:flex;flex-direction:column;gap:.5rem}.list-scroll{max-height:300px;overflow:auto}.checkbox-item{display:flex;align-items:center;gap:.5rem;padding:.5rem 0}.checkbox-item input[type=checkbox]{width:auto;padding:0;margin:0;box-shadow:none;accent-color:var(--color-primary)}.badge{display:inline-flex;align-items:center;padding:.25rem .65rem;background:var(--color-surface-hover);border-radius:var(--radius-full);font-size:.75rem;font-weight:500;color:var(--color-text-secondary)}.badge-primary{background:var(--color-primary-light);color:var(--color-primary)}.badge-success{background:var(--color-success-bg);color:var(--color-success)}.badge-warning{background:var(--color-warning-bg);color:var(--color-warning)}.badge-error{background:var(--color-error-bg);color:var(--color-error)}.metadata-chip{display:inline-block;font-size:.75rem;background:var(--color-bg);padding:.2rem .4rem;border-radius:4px}.error{color:var(--color-error);font-size:.875rem;margin-top:.5rem}.table-container{overflow-x:auto;border-radius:var(--radius-lg);border:1px solid var(--color-border);background:var(--color-surface)}.table{width:100%;border-collapse:collapse;font-size:.875rem}.table th,.table td{text-align:left;padding:.85rem 1rem;border-bottom:1px solid var(--color-border)}.table th{background:var(--color-bg);font-weight:600;color:var(--color-text-secondary);font-size:.75rem;text-transform:uppercase;letter-spacing:.05em}.table tbody tr{transition:background-color var(--transition-fast)}.table tbody tr:hover{background:var(--color-surface-hover)}.table tbody tr:last-child td{border-bottom:none}.chat-layout{display:grid;grid-template-columns:280px 1fr;gap:1.5rem;align-items:start;height:calc(100vh - 140px)}.chat-sidebar{display:flex;flex-direction:column;gap:1rem}.chat-panel{display:flex;flex-direction:column;gap:1rem;height:100%}.chat-panel-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-shrink:0}.chat-messages{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:var(--color-bg);border-radius:var(--radius-lg);border:1px solid var(--color-border)}.chat-message{padding:.85rem 1rem;border-radius:var(--radius-lg);background:var(--color-surface);border:1px solid var(--color-border);max-width:85%;animation:slideIn .2s ease}.chat-message.own{background:var(--color-primary-light);border-color:var(--color-primary);margin-left:auto}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.chat-message-meta{display:flex;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary);margin-bottom:.35rem}.chat-message-author{font-weight:600;color:var(--color-text)}.chat-message-time{color:var(--color-text-muted)}.chat-input{display:flex;flex-direction:column;gap:.75rem;flex-shrink:0}.chat-input textarea{min-height:80px;resize:none}.status-pill{display:inline-flex;align-items:center;gap:.35rem;padding:.25rem .75rem;border-radius:var(--radius-full);font-size:.75rem;font-weight:500;text-transform:capitalize;background:var(--color-surface-hover);color:var(--color-text)}.status-pill:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.status-pill.connected{background:var(--color-success-bg);color:var(--color-success)}.status-pill.connecting{background:var(--color-warning-bg);color:var(--color-warning)}.status-pill.disconnected{background:var(--color-error-bg);color:var(--color-error)}.loading-spinner{width:24px;height:24px;border:2px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:spin .8s linear infinite}.loading-spinner.sm{width:16px;height:16px;border-width:2px}.loading-container{display:flex;align-items:center;justify-content:center;padding:3rem;color:var(--color-text-secondary)}.loading-container .loading-spinner{width:32px;height:32px}@keyframes spin{to{transform:rotate(360deg)}}.skeleton{background:linear-gradient(90deg,var(--color-surface-hover) 25%,#e2e8f0 50%,var(--color-surface-hover) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:var(--radius-sm)}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.empty-state{text-align:center;padding:3rem 2rem;color:var(--color-text-secondary)}.empty-state-icon{font-size:3rem;margin-bottom:1rem;opacity:.5}.empty-state-title{font-size:1.1rem;font-weight:600;color:var(--color-text);margin-bottom:.5rem}.empty-state-text{font-size:.875rem;margin-bottom:1.5rem}.toast-container{position:fixed;bottom:1.5rem;right:1.5rem;display:flex;flex-direction:column;gap:.75rem;z-index:1000}.toast{background:var(--color-surface);border-radius:var(--radius-md);padding:1rem 1.25rem;box-shadow:var(--shadow-lg);border:1px solid var(--color-border);display:flex;align-items:center;gap:.75rem;min-width:280px;animation:slideInRight .3s ease}.toast-title{font-weight:600;color:var(--color-text)}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.toast-success{border-left:4px solid var(--color-success)}.toast-error{border-left:4px solid var(--color-error)}.toast-warning{border-left:4px solid var(--color-warning)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;display:flex;align-items:center;justify-content:center;background:#0f172a80;padding:1.5rem}.modal-backdrop.side{justify-content:flex-end;padding:0}.modal-card{background:var(--color-surface);border-radius:var(--radius-lg);padding:1.5rem;width:min(520px,90vw);box-shadow:var(--shadow-lg);border:1px solid var(--color-border);display:flex;flex-direction:column;gap:1rem;max-height:calc(100vh - 3rem);overflow:auto}.modal-card.sm{width:min(400px,90vw)}.modal-card.lg{width:min(720px,90vw)}.modal-card.side{height:100%;border-radius:0;max-height:100vh;padding:1.5rem;width:min(720px,90vw)}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.modal-title{font-size:1.05rem;font-weight:600;margin:0}.modal-description{font-size:.85rem;color:var(--color-text-secondary);margin:.35rem 0 0}.modal-actions{display:flex;gap:.75rem;justify-content:flex-end;flex-wrap:wrap}.report-preview{flex:1;border:1px solid var(--color-border);border-radius:var(--radius-lg);overflow:hidden;background:var(--color-bg)}.report-preview-frame{width:100%;height:100%;border:none}.button-row{display:flex;gap:.75rem;justify-content:flex-end;flex-wrap:wrap}.text-error{color:var(--color-error)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.alert-success{background:var(--color-success-bg);border-color:var(--color-success);color:#065f46}.alert-error{background:var(--color-error-bg);border-color:var(--color-error);color:#b91c1c}.divider{height:1px;background:var(--color-border);margin:1rem 0}.text-muted{color:var(--color-text-secondary);font-size:.875rem}.text-strong{font-weight:600;color:var(--color-text)}.text-small{font-size:.8rem}.text-center{text-align:center}.inline-block{display:inline-block}.text-right{text-align:right}.flex{display:flex}.flex-wrap{flex-wrap:wrap}.align-center{align-items:center}.align-start{align-items:flex-start}.flex-center{display:flex;align-items:center;justify-content:center}.flex-between{display:flex;align-items:center;justify-content:space-between}.gap-sm{gap:.5rem}.gap-md{gap:1rem}.gap-lg{gap:1.5rem}.mt-xs{margin-top:.25rem}.mt-sm{margin-top:.5rem}.ml-xs{margin-left:.25rem}.ml-auto{margin-left:auto}.mt-md{margin-top:1rem}.mt-lg{margin-top:1.5rem}.mb-xs{margin-bottom:.25rem}.mb-sm{margin-bottom:.5rem}.mb-md{margin-bottom:1rem}.mb-lg{margin-bottom:1.5rem}.p-sm{padding:1rem}.p-md{padding:2rem}.m-0{margin:0}.min-h-50{min-height:50vh}.min-h-60{min-height:60vh}.min-h-full{min-height:100vh}.max-w-600{max-width:600px}.max-w-180{max-width:180px}.pre-wrap{white-space:pre-wrap}@media (max-width: 900px){.app-shell{grid-template-columns:1fr}.sidebar{flex-direction:row;align-items:center;flex-wrap:wrap;height:auto;position:relative;padding:1rem;gap:1rem}.brand-subtitle{display:none}.nav{flex-direction:row;gap:.5rem;flex-wrap:wrap;justify-content:center}.nav-link{padding:.5rem .75rem;font-size:.8rem}.chat-layout{grid-template-columns:1fr;height:auto}.chat-sidebar{order:2}.chat-panel{order:1}.chat-messages{max-height:400px}.main,.page{padding:1.25rem}.topbar{padding:.75rem 1rem}.grid.two{grid-template-columns:1fr}}.password-input-wrapper{position:relative}.password-reveal-btn{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);background:none;padding:.25rem;opacity:.6;border-radius:var(--radius-sm)}.password-reveal-btn:hover{opacity:1;background:var(--color-surface-hover)}.password-reveal-btn:focus-visible{outline:2px solid var(--color-border-focus);outline-offset:2px}.password-strength{margin-top:.5rem}.password-strength-bar{height:4px;border-radius:2px;background:var(--color-border);overflow:hidden;margin-bottom:.35rem}.password-strength-fill{height:100%;transition:width .2s,background-color .2s}.password-strength-label{font-size:.75rem;color:var(--color-text-secondary)}.password-requirements{list-style:none;padding:0;margin:.5rem 0 0;font-size:.75rem;color:var(--color-text-secondary)}.password-requirements li{display:flex;align-items:center;gap:.35rem;margin-bottom:.25rem}.password-requirements li.met{color:var(--color-success)}.password-requirements li.met:before{content:"✓"}.password-requirements li:before{content:"○"}.success-view{text-align:center;padding:2rem 0}.success-icon{width:64px;height:64px;background:var(--color-success-bg);color:var(--color-success);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:2rem;margin:0 auto 1rem}.forgot-password-link{font-size:.8rem;color:var(--color-text-secondary);cursor:pointer;text-decoration:underline}.forgot-password-link:hover{color:var(--color-primary)}.forgot-password-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.forgot-password-content{background:var(--color-surface);border-radius:var(--radius-lg);padding:1.5rem;max-width:400px;width:90%;text-align:center}.forgot-password-icon{width:48px;height:48px;background:var(--color-primary-light);color:var(--color-primary);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.5rem;margin:0 auto 1rem}.form-error-inline{font-size:.8rem;color:var(--color-error);margin-top:.25rem}
