:root{--bg: #f6f7f9;--surface: #ffffff;--surface-2: #f9fafb;--border: #e5e7eb;--border-strong: #d1d5db;--text: #111827;--text-2: #4b5563;--text-3: #9ca3af;--brand: #4f46e5;--brand-hover: #4338ca;--brand-soft: #eef2ff;--brand-text: #3730a3;--green: #047857;--green-soft: #ecfdf5;--amber: #b45309;--amber-soft: #fffbeb;--red: #b91c1c;--red-soft: #fef2f2;--blue: #1d4ed8;--blue-soft: #eff6ff;--violet: #6d28d9;--violet-soft: #f5f3ff;--gray-soft: #f3f4f6;--shadow: 0 1px 2px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);--radius: 10px;--sidebar: #0f172a;--sidebar-text: #cbd5e1;--sidebar-active: #1e293b;color-scheme:light}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--bg: #0b0f17;--surface: #111827;--surface-2: #0f1520;--border: #1f2937;--border-strong: #374151;--text: #f3f4f6;--text-2: #9ca3af;--text-3: #6b7280;--brand: #6366f1;--brand-hover: #818cf8;--brand-soft: #1e1b4b;--brand-text: #c7d2fe;--green: #34d399;--green-soft: #052e22;--amber: #fbbf24;--amber-soft: #2d1f05;--red: #f87171;--red-soft: #2d0b0b;--blue: #93c5fd;--blue-soft: #0b1d3a;--violet: #c4b5fd;--violet-soft: #1f1640;--gray-soft: #1f2937;--sidebar: #070a10;--sidebar-active: #151c2b;color-scheme:dark}}:root[data-theme=dark]{--bg: #0b0f17;--surface: #111827;--surface-2: #0f1520;--border: #1f2937;--border-strong: #374151;--text: #f3f4f6;--text-2: #9ca3af;--text-3: #6b7280;--brand: #6366f1;--brand-hover: #818cf8;--brand-soft: #1e1b4b;--brand-text: #c7d2fe;--green: #34d399;--green-soft: #052e22;--amber: #fbbf24;--amber-soft: #2d1f05;--red: #f87171;--red-soft: #2d0b0b;--blue: #93c5fd;--blue-soft: #0b1d3a;--violet: #c4b5fd;--violet-soft: #1f1640;--gray-soft: #1f2937;--sidebar: #070a10;--sidebar-active: #151c2b;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased}a{color:var(--brand);text-decoration:none}h1,h2,h3{margin:0;font-weight:600;letter-spacing:-.01em}h1{font-size:22px}h2{font-size:16px}h3{font-size:14px}.mono{font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:13px}.muted{color:var(--text-2)}.faint{color:var(--text-3)}.small{font-size:12.5px}.shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100%}.sidebar{background:var(--sidebar);color:var(--sidebar-text);padding:16px 12px;display:flex;flex-direction:column;gap:4px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 18px;color:#fff;font-weight:600;font-size:16px}.brand-mark{width:30px;height:30px;border-radius:8px;background:var(--brand);display:grid;place-items:center}.nav-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;padding:14px 10px 6px}.nav-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--sidebar-text);cursor:pointer;border:0;background:none;font:inherit;width:100%;text-align:left}.nav-item:hover{background:var(--sidebar-active);color:#fff}.nav-item.active{background:var(--sidebar-active);color:#fff;box-shadow:inset 2px 0 0 var(--brand)}.nav-item .count{margin-left:auto;background:#334155;color:#e2e8f0;border-radius:999px;font-size:11px;padding:1px 8px}.nav-item .count.hot{background:#b91c1c;color:#fff}.sidebar-foot{margin-top:auto;border-top:1px solid #1e293b;padding-top:12px}.tenant-switch{width:100%;background:#1e293b;color:#fff;border:1px solid #334155;border-radius:8px;padding:8px 10px;font:inherit}.main{min-width:0;display:flex;flex-direction:column}.topbar{height:60px;display:flex;align-items:center;gap:12px;padding:0 28px;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:0;z-index:5}.topbar .spacer{flex:1}.content{padding:24px 28px 48px;max-width:1400px;width:100%}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}.page-head p{margin:4px 0 0;color:var(--text-2)}.menu-btn{display:none}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.card-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border);gap:12px}.card-body{padding:16px 18px}.grid{display:grid;gap:16px}.kpis{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.two{grid-template-columns:minmax(0,3fr) minmax(0,2fr)}.kpi{padding:16px 18px}.kpi .label{color:var(--text-2);font-size:13px;display:flex;align-items:center;gap:8px}.kpi .value{font-size:28px;font-weight:600;margin-top:6px;letter-spacing:-.02em}.kpi .hint{font-size:12.5px;color:var(--text-3);margin-top:2px}.kpi-icon{width:28px;height:28px;border-radius:8px;display:grid;place-items:center}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th{text-align:left;font-weight:500;font-size:12px;color:var(--text-2);text-transform:uppercase;letter-spacing:.04em;padding:10px 16px;background:var(--surface-2);border-bottom:1px solid var(--border);white-space:nowrap}td{padding:12px 16px;border-bottom:1px solid var(--border);vertical-align:top}tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--surface-2)}tbody tr:last-child td{border-bottom:0}.cell-title{font-weight:500}.cell-sub{color:var(--text-2);font-size:12.5px;margin-top:2px;max-width:520px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.badge{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:500;white-space:nowrap}.badge .dot{width:6px;height:6px;border-radius:50%;background:currentColor}.b-gray{background:var(--gray-soft);color:var(--text-2)}.b-blue{background:var(--blue-soft);color:var(--blue)}.b-amber{background:var(--amber-soft);color:var(--amber)}.b-green{background:var(--green-soft);color:var(--green)}.b-red{background:var(--red-soft);color:var(--red)}.b-violet{background:var(--violet-soft);color:var(--violet)}.b-brand{background:var(--brand-soft);color:var(--brand-text)}.btn{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border-radius:8px;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);font:inherit;font-weight:500;cursor:pointer;white-space:nowrap}.btn:hover{background:var(--surface-2)}.btn:disabled{opacity:.55;cursor:default}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.primary:hover{background:var(--brand-hover)}.btn.danger{color:var(--red)}.btn.ghost{border-color:transparent;background:none}.btn.sm{height:30px;padding:0 10px;font-size:13px}.input,select.input,textarea.input{height:36px;padding:0 12px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;width:100%}textarea.input{height:auto;padding:10px 12px;resize:vertical;min-height:84px}.input:focus{outline:2px solid var(--brand);outline-offset:-1px;border-color:var(--brand)}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:13px;font-weight:500;color:var(--text-2)}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid var(--border)}.toolbar .search{flex:1;min-width:200px;position:relative}.toolbar .search .input{padding-left:34px}.toolbar .search svg{position:absolute;left:10px;top:10px;color:var(--text-3)}.tabs{display:flex;gap:2px;padding:0 12px;border-bottom:1px solid var(--border);overflow-x:auto}.tab{border:0;background:none;font:inherit;color:var(--text-2);padding:12px 10px;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;display:flex;gap:6px;align-items:center}.tab.active{color:var(--text);border-bottom-color:var(--brand);font-weight:500}.tab .n{background:var(--gray-soft);border-radius:999px;padding:0 7px;font-size:11.5px;color:var(--text-2)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;z-index:30;display:flex;justify-content:flex-end;animation:fade .15s}.drawer{width:min(620px,100%);background:var(--surface);height:100%;overflow-y:auto;box-shadow:var(--shadow-lg);animation:slide .18s ease-out;display:flex;flex-direction:column}.drawer-head{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;gap:12px;align-items:flex-start;position:sticky;top:0;background:var(--surface);z-index:1}.drawer-body{padding:20px 22px;display:flex;flex-direction:column;gap:20px}.modal-wrap{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;z-index:30;display:grid;place-items:center;padding:16px;animation:fade .15s}.modal{width:min(560px,100%);background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);max-height:calc(100vh - 32px);overflow-y:auto}@keyframes fade{0%{opacity:0}}@keyframes slide{0%{transform:translate(24px);opacity:.6}}.section-title{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3);font-weight:600;margin-bottom:8px}.facts{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px 14px}.facts dt{color:var(--text-2)}.facts dd{margin:0;overflow-wrap:anywhere}.prose{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:12px 14px}.timeline{display:flex;flex-direction:column;gap:12px}.tl-item{display:flex;gap:10px}.tl-dot{width:26px;height:26px;border-radius:50%;background:var(--brand-soft);color:var(--brand-text);display:grid;place-items:center;flex:none;font-size:11px;font-weight:600}.tl-dot.status{background:var(--gray-soft);color:var(--text-2)}.status-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.status-opt{border:1px solid var(--border-strong);background:var(--surface);border-radius:8px;padding:9px 8px;cursor:pointer;font:inherit;font-size:13px;color:var(--text);display:flex;flex-direction:column;align-items:center;gap:4px}.status-opt.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand-text);font-weight:500}.transcript{display:flex;flex-direction:column;gap:8px;max-height:420px;overflow-y:auto}.bubble{padding:8px 12px;border-radius:10px;max-width:85%}.bubble.agent{background:var(--brand-soft);color:var(--text);align-self:flex-start}.bubble.user{background:var(--gray-soft);align-self:flex-end}.bubble .who{font-size:11px;font-weight:600;color:var(--text-2);margin-bottom:2px}.empty{text-align:center;padding:48px 16px;color:var(--text-2)}.empty svg{color:var(--text-3);margin-bottom:8px}.spinner{width:18px;height:18px;border:2px solid var(--border-strong);border-top-color:var(--brand);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.center{display:grid;place-items:center;min-height:200px}.banner{padding:10px 14px;border-radius:8px;background:var(--amber-soft);color:var(--amber);display:flex;gap:8px;align-items:center;margin-bottom:16px}.toast{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:#111827;color:#fff;padding:10px 16px;border-radius:10px;box-shadow:var(--shadow-lg);z-index:50;animation:fade .15s}.toast.err{background:#7f1d1d}.avatar{width:32px;height:32px;border-radius:50%;background:var(--brand-soft);color:var(--brand-text);display:grid;place-items:center;font-weight:600;font-size:12px;flex:none}.row{display:flex;align-items:center;gap:10px}.stack{display:flex;flex-direction:column;gap:14px}.list-item{display:flex;gap:12px;padding:12px 18px;border-bottom:1px solid var(--border);align-items:flex-start;cursor:pointer}.list-item:hover{background:var(--surface-2)}.list-item:last-child{border-bottom:0}.bars{display:flex;align-items:flex-end;gap:6px;height:140px;padding-top:8px}.bar{flex:1;background:var(--brand);border-radius:4px 4px 0 0;min-height:2px;position:relative;opacity:.85}.bar:hover{opacity:1}.bar-labels{display:flex;gap:6px;margin-top:6px}.bar-labels span{flex:1;text-align:center;font-size:10.5px;color:var(--text-3)}.route{display:flex;flex-direction:column;gap:2px}.route .arrow{color:var(--text-3);font-size:12px}.login{min-height:100%;display:grid;grid-template-columns:1fr 1fr}.login-art{background:var(--sidebar);color:#e2e8f0;padding:48px;display:flex;flex-direction:column;justify-content:space-between}.login-art h2{font-size:28px;color:#fff;line-height:1.25;max-width:420px}.login-form{display:grid;place-items:center;padding:24px}.login-card{width:min(380px,100%);display:flex;flex-direction:column;gap:16px}@media (max-width: 960px){.two,.login{grid-template-columns:1fr}.login-art{display:none}}@media (max-width: 760px){.shell{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;z-index:40;transform:translate(-100%);transition:transform .2s}.sidebar.open{transform:none}.menu-btn{display:inline-flex}.topbar{padding:0 16px}.content{padding:16px 16px 40px}.facts{grid-template-columns:1fr;gap:2px}.facts dd{margin-bottom:8px}.status-picker{grid-template-columns:repeat(2,1fr)}.hide-sm{display:none}}
