:root{color:#0f172a;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f3f4f6;font-family:Inter,system-ui,-apple-system,sans-serif;font-weight:400;line-height:1.5}*{box-sizing:border-box}body{background:linear-gradient(#f8fafc 0%,#eef2ff 100%);min-height:100vh;margin:0}a{color:inherit}.app-bg{color:#0f172a;background:radial-gradient(1200px at 20% 20%,#eef2ff 0%,#fff0 48%),radial-gradient(900px at 80% 0,#e0f2fe 0%,#fff0 52%),linear-gradient(#f8fafc 0%,#fff 60%);min-height:100vh}.app-shell{grid-template-columns:320px 1fr;gap:24px;max-width:1400px;margin:0 auto;padding:32px 24px 48px;display:grid}@media (max-width:1100px){.app-shell{grid-template-columns:1fr}}.rail{flex-direction:column;gap:18px;display:flex}.rail-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px;box-shadow:0 20px 40px #0f172a0f}.brand-card .brand-row{align-items:center;gap:12px;display:flex}.brand-logo{width:52px;height:auto}.brand-title{letter-spacing:-.01em;margin:4px 0 6px;font-size:26px}.eyebrow{text-transform:uppercase;letter-spacing:.08em;color:#6b7280;margin:0;font-size:12px}.lede{color:#475569;margin:0}.pill-row{flex-wrap:wrap;gap:8px;margin:12px 0;display:flex}.pill{color:#0f172a;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;align-items:center;gap:6px;padding:6px 10px;font-size:13px;font-weight:600;display:inline-flex}.pill-live{color:#15803d;background:#ecfdf3;border-color:#bbf7d0}.pill-warn{color:#c2410c;background:#fff7ed;border-color:#fed7aa}.pill-muted{color:#475569;background:#f8fafc}.stat-grid{grid-template-columns:repeat(3,1fr);gap:12px;display:grid}.stat-label{color:#6b7280;letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:12px}.stat-value{margin:2px 0 0;font-size:20px;font-weight:700}.label{letter-spacing:.08em;color:#9ca3af;text-transform:uppercase;margin:0;font-size:12px}.muted{color:#6b7280;margin:0}.muted.small{font-size:12px}.card-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.form-stack{flex-direction:column;gap:10px;margin-top:12px;display:flex}.input{background:#f8fafc;border:1px solid #d1d5db;border-radius:10px;padding:12px 14px;font-size:15px}.action-row{flex-wrap:wrap;gap:10px;display:flex}.btn{cursor:pointer;border:1px solid #0000;border-radius:10px;padding:11px 14px;font-weight:700;transition:transform .12s,box-shadow .12s,opacity .12s,background .12s}.btn-primary{color:#fff;background:linear-gradient(135deg,#4338ca 0%,#2563eb 100%);box-shadow:0 10px 24px #2563eb4d}.btn-primary:hover{transform:translateY(-1px)}.btn-ghost{color:#0f172a;background:#f8fafc;border-color:#e2e8f0}.btn:disabled{opacity:.6;cursor:not-allowed}.status{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;font-weight:600}.status-uploading,.status-idle{color:#4338ca;background:#eef2ff;border:1px solid #c7d2fe}.status-success{color:#15803d;background:#ecfdf3;border:1px solid #bbf7d0}.status-error{color:#b91c1c;background:#fef2f2;border:1px solid #fecdd3}.doc-list ul{flex-direction:column;gap:8px;margin:8px 0 0;padding:0;list-style:none;display:flex}.doc-list{flex-direction:column;gap:8px;max-height:360px;padding-right:4px;display:flex;overflow-y:auto}.doc-list .spacer{height:12px}.doc-list li{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;flex-direction:column;gap:2px;padding:10px;display:flex}.doc-name{font-weight:600}.doc-meta{color:#64748b;font-size:13px}.main-stack{flex-direction:column;gap:18px;display:flex}.hero-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px;box-shadow:0 20px 40px #0f172a0f}.hero-actions{flex-wrap:wrap;align-items:flex-end;gap:12px;margin-top:12px;display:flex}.k-wrap{flex-direction:column;gap:6px;display:flex}.chat-surface{background:#fff;border:1px solid #e5e7eb;border-radius:18px;flex-direction:column;gap:14px;min-height:520px;padding:18px;display:flex;box-shadow:0 22px 44px #0f172a12}.chat-head{justify-content:space-between;align-items:center;display:flex}.chat-body{grid-template-columns:2fr 1fr;gap:14px;display:grid}@media (max-width:1100px){.chat-body{grid-template-columns:1fr}}.chat-thread{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;flex-direction:column;gap:12px;max-height:65vh;padding:12px;display:flex;overflow-y:auto}.message{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:12px;box-shadow:0 4px 12px #0f172a0a}.message-user{background:#eef2ff;border-color:#c7d2fe}.message-meta{text-transform:uppercase;letter-spacing:.06em;color:#6b7280;margin-bottom:4px;font-size:12px}.message-body{white-space:pre-wrap;color:#0f172a;margin:0}.message-tabs{gap:6px;margin-bottom:8px;display:inline-flex}.tab{cursor:pointer;color:#1f2937;background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;padding:6px 10px;font-weight:600}.tab-active{color:#1e1b4b;background:#eef2ff;border-color:#c7d2fe}.context-note{color:#6b7280;margin-top:10px;font-size:12px}.sources-grid{grid-template-columns:1fr 1.1fr;gap:10px;display:grid}@media (max-width:900px){.sources-grid{grid-template-columns:1fr}}.sources-list{flex-wrap:wrap;align-content:flex-start;gap:8px;display:flex}.source-chip{cursor:pointer;color:#1f2937;background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px;font-weight:600}.source-chip-active{color:#0f172a;background:#ecfeff;border-color:#67e8f9}.source-chip-muted{cursor:default;background:#f1f5f9}.context-preview{background:#fff;border:1px solid #e5e7eb;border-radius:10px;flex-direction:column;gap:6px;min-height:140px;padding:10px;display:flex;overflow-y:auto}.context-meta{color:#4b5563;font-size:13px}.context-text{color:#111827;font-size:14px;line-height:1.5}.insight-panel{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;flex-direction:column;gap:10px;padding:12px;display:flex}.insight-list{flex-direction:column;gap:10px;max-height:60vh;display:flex;overflow-y:auto}.insight-item{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px}.insight-source{color:#0f172a;margin:0 0 4px;font-weight:600}.insight-text{color:#475569;margin:0;font-size:14px;line-height:1.5}.chat-input-row{align-items:center;gap:10px;display:flex}.chat-input-row .input{flex:1}.empty{color:#9ca3af;text-align:center;padding:24px 12px}.footer{color:#6b7280;text-align:left;max-width:1400px;margin:12px auto 32px;padding:0 24px;font-size:13px}
