@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");:root{--bg:#0a0c14;--bg-card:#111827;--bg-card2:#1a2235;--border:#1e2d45;--primary:#6366f1;--primary-hover:#4f46e5;--accent:#22d3ee;--success:#10b981;--warning:#f59e0b;--danger:#ef4444;--text:#f1f5f9;--text-muted:#64748b;--radius:12px}*{box-sizing:border-box;margin:0;padding:0}body{font-family:Inter,sans-serif;background:var(--bg);color:var(--text)}.layout,body{min-height:100vh}.layout,.sidebar{display:flex}.sidebar{width:240px;background:var(--bg-card);border-right:1px solid var(--border);padding:1.5rem 1rem;flex-direction:column;gap:.5rem;position:fixed;height:100vh;overflow-y:auto}.sidebar-logo{font-size:1.3rem;font-weight:700;color:var(--primary);padding:.5rem .75rem 1.25rem;letter-spacing:-.5px}.main{margin-left:240px;flex:1 1;padding:2rem}.nav-link{display:flex;align-items:center;gap:.6rem;padding:.6rem .75rem;border-radius:8px;color:var(--text-muted);text-decoration:none;font-size:.875rem;font-weight:500;transition:all .15s}.nav-link.active,.nav-link:hover{background:var(--bg-card2);color:var(--text)}.nav-link.active{color:var(--primary)}.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem}.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));grid-gap:1rem;gap:1rem}.stat-card{background:var(--bg-card2);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}.stat-card .label{font-size:.75rem;color:var(--text-muted);margin-bottom:.4rem;text-transform:uppercase;letter-spacing:.05em}.stat-card .value{font-size:1.75rem;font-weight:700}.stat-card .sub{font-size:.8rem;color:var(--text-muted);margin-top:.25rem}.form-group{display:flex;flex-direction:column;gap:.4rem;margin-bottom:1rem}.form-group label{font-size:.8rem;font-weight:500;color:var(--text-muted)}input,select,textarea{background:var(--bg-card2);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:.6rem .85rem;font-size:.875rem;font-family:inherit;width:100%;transition:border-color .15s}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary)}.btn{display:inline-flex;align-items:center;gap:.4rem;padding:.6rem 1.2rem;border-radius:8px;border:none;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-hover)}.btn-ghost{background:transparent;color:var(--text-muted);border:1px solid var(--border)}.btn-ghost:hover{background:var(--bg-card2);color:var(--text)}.btn-danger{background:var(--danger);color:#fff}.btn-danger:hover{opacity:.85}.btn-sm{padding:.35rem .75rem;font-size:.8rem}.btn:disabled{opacity:.5;cursor:not-allowed}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:.875rem}th{text-align:left;font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}td,th{padding:.75rem 1rem;border-bottom:1px solid var(--border)}tr:last-child td{border-bottom:none}tr:hover td{background:hsla(0,0%,100%,.02)}.badge{display:inline-block;padding:.2rem .55rem;border-radius:99px;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em}.badge-green{background:rgba(16,185,129,.15);color:var(--success)}.badge-yellow{background:rgba(245,158,11,.15);color:var(--warning)}.badge-red{background:rgba(239,68,68,.15);color:var(--danger)}.badge-blue{background:rgba(99,102,241,.15);color:var(--primary)}.badge-gray{background:rgba(100,116,139,.15);color:var(--text-muted)}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 0,rgba(99,102,241,.12) 0,transparent 70%)}.login-card{width:100%;max-width:380px;padding:2.5rem;background:var(--bg-card);border:1px solid var(--border);border-radius:16px}.login-logo{font-size:1.5rem;font-weight:700;color:var(--primary);margin-bottom:.4rem}.login-sub{font-size:.875rem;color:var(--text-muted);margin-bottom:1.75rem}.login-legal{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:1.5rem;font-size:.75rem;color:var(--text-muted)}.login-legal a{color:var(--text-muted);text-decoration:none}.login-legal a:hover{color:var(--primary);text-decoration:underline}.login-legal span{opacity:.4}.legal-wrap{min-height:100vh;background:var(--bg);padding:2rem 1rem}.legal-container{max-width:760px;margin:0 auto}.legal-header{margin-bottom:2.5rem}.legal-back{display:inline-block;font-size:.8rem;color:var(--text-muted);text-decoration:none;margin-bottom:1.5rem;transition:color .15s}.legal-back:hover,.legal-logo{color:var(--primary)}.legal-logo{font-size:1.25rem;font-weight:700;margin-bottom:.75rem}.legal-header h1{font-size:1.75rem;font-weight:700;color:var(--text);margin-bottom:.5rem}.legal-date{font-size:.8rem;color:var(--text-muted)}.legal-body section{margin-bottom:2rem;padding-bottom:2rem;border-bottom:1px solid var(--border)}.legal-body section:last-child{border-bottom:none}.legal-body h2{font-size:1rem;font-weight:700;color:var(--text);margin-bottom:.75rem}.legal-body h3{font-size:.875rem;font-weight:600;color:var(--text);margin:1rem 0 .5rem}.legal-body p{font-size:.875rem;color:var(--text-muted);line-height:1.7;margin-bottom:.6rem}.legal-body ul{padding-left:1.4rem;margin:.5rem 0 .75rem}.legal-body li{font-size:.875rem;color:var(--text-muted);line-height:1.7;margin-bottom:.3rem}.legal-body li::marker{color:var(--primary)}.legal-body strong{color:var(--text);font-weight:600}.legal-body a{color:var(--primary);text-decoration:underline}.legal-body a:hover{opacity:.8}.legal-footer{display:flex;align-items:center;justify-content:center;gap:.75rem;padding:2rem 0;font-size:.8rem;color:var(--text-muted);border-top:1px solid var(--border);margin-top:1rem}.legal-footer a{color:var(--text-muted);text-decoration:none}.legal-footer a:hover{color:var(--primary)}.legal-footer span{opacity:.4}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem}.page-title{font-size:1.3rem;font-weight:700}.page-sub{font-size:.875rem;color:var(--text-muted);margin-top:.25rem}.toggle{display:flex;align-items:center;gap:.5rem;cursor:pointer}.toggle input[type=checkbox]{width:36px;height:20px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--border);border-radius:99px;position:relative;cursor:pointer;transition:background .15s}.toggle input[type=checkbox]:checked{background:var(--primary)}.toggle input[type=checkbox]:before{content:"";position:absolute;width:14px;height:14px;background:#fff;border-radius:50%;top:3px;left:3px;transition:transform .15s}.toggle input[type=checkbox]:checked:before{transform:translateX(16px)}.progress-bar{background:var(--border);border-radius:99px;height:8px;overflow:hidden}.progress-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--primary),var(--accent));transition:width .5s}.tabs{display:flex;gap:.25rem;border-bottom:1px solid var(--border);margin-bottom:1.5rem}.tab{padding:.6rem 1rem;font-size:.875rem;font-weight:500;color:var(--text-muted);cursor:pointer;margin-bottom:-1px;transition:all .15s;background:none;border:none;border-bottom:2px solid transparent;font-family:inherit}.tab.active{color:var(--primary);border-bottom-color:var(--primary)}.tab:hover{color:var(--text)}.alert{padding:.75rem 1rem;border-radius:8px;font-size:.875rem;margin-bottom:1rem}.alert-error{background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:#fca5a5}.alert-success{background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.3);color:#6ee7b7}.qr-container{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:1.5rem}.qr-container img{border-radius:12px;border:4px solid #fff}.dropzone{border:2px dashed var(--border);border-radius:12px;padding:2.5rem;text-align:center;cursor:pointer;transition:all .2s}.dropzone.active,.dropzone:hover{border-color:var(--primary);background:rgba(99,102,241,.05)}.dropzone-icon{font-size:2.5rem;margin-bottom:.75rem}.dropzone-text{font-size:.875rem;color:var(--text-muted)}.messages{display:flex;flex-direction:column;gap:.75rem;max-height:500px;overflow-y:auto;padding:1rem}.msg{max-width:75%}.msg-user{align-self:flex-end}.msg-assistant{align-self:flex-start}.msg-bubble{padding:.6rem 1rem;border-radius:12px;font-size:.875rem;line-height:1.5}.msg-user .msg-bubble{background:var(--primary);color:#fff;border-bottom-right-radius:4px}.msg-assistant .msg-bubble{background:var(--bg-card2);border:1px solid var(--border);border-bottom-left-radius:4px}.msg-time{font-size:.7rem;color:var(--text-muted);margin-top:.25rem}.msg-user .msg-time{text-align:right}@keyframes conv-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(1.3)}}@keyframes conv-glow{0%,to{box-shadow:0 0 0 0 rgba(99,102,241,.3)}50%{box-shadow:0 0 8px 2px rgba(99,102,241,.25)}}.conv-pulse-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#ef4444;animation:conv-pulse 1.5s ease-in-out infinite;flex-shrink:0}.conv-item-alert{animation:conv-glow 2s ease-in-out infinite}.conv-alert-badge{display:inline-flex;align-items:center;padding:.15rem .6rem;border-radius:99px;font-size:.7rem;font-weight:700;background:rgba(239,68,68,.15);color:#ef4444;animation:conv-pulse 1.5s ease-in-out infinite}.ai-summary-md h1,.ai-summary-md h2,.ai-summary-md h3{font-size:1rem;font-weight:700;margin:1.2rem 0 .4rem;color:var(--text);border-bottom:1px solid var(--border);padding-bottom:.3rem}.ai-summary-md h1{font-size:1.1rem}.ai-summary-md p{margin:.4rem 0 .6rem}.ai-summary-md strong{color:#e0e0ff;font-weight:700}.ai-summary-md em{color:var(--text-muted);font-style:italic}.ai-summary-md ol,.ai-summary-md ul{padding-left:1.4rem;margin:.3rem 0 .8rem}.ai-summary-md li{margin:.2rem 0}.ai-summary-md li::marker{color:var(--primary)}.ai-summary-md hr{border:none;border-top:1px dashed var(--border);margin:1rem 0}.ai-summary-md code{background:rgba(99,102,241,.15);padding:.15rem .4rem;border-radius:4px;font-size:.82rem;color:var(--primary)}.ai-summary-md blockquote{border-left:3px solid var(--primary);padding:.3rem .8rem;margin:.5rem 0;color:var(--text-muted);background:rgba(99,102,241,.05);border-radius:0 6px 6px 0}.ai-summary-md table{width:100%;border-collapse:collapse;margin:.5rem 0;font-size:.85rem}.ai-summary-md td,.ai-summary-md th{border:1px solid var(--border);padding:.4rem .6rem;text-align:left}.ai-summary-md th{background:rgba(99,102,241,.1);font-weight:600}.ai-summary-md a{color:var(--primary);text-decoration:underline}