:root { --bg-primary: #0f172a; --bg-secondary: #1e293b; --bg-card: #1e293b; --bg-input: #0f172a; --bg-hover: rgba(15,23,42,0.25); --text-primary: #e2e8f0; --text-secondary: #94a3b8; --text-muted: #64748b; --border-color: #334155; --accent: #38bdf8; --accent-bg: #1e3a5f; --toast-bg: #166534; --toast-color: #86efac; --toast-error-bg: #7f1d1d; --toast-error-color: #fca5a5; --pre-color: #a5b4fc; --pre-bg: #0f172a; --chat-bg: #0f172a; --msg-user-bg: #1e3a5f; --msg-user-color: #93c5fd; --msg-assistant-bg: #1a3a2a; --msg-assistant-color: #86efac; --msg-system-bg: #3b1a3a; --msg-system-color: #f0abfc; --kv-border: #1e293b; } [data-theme=light] { --bg-primary: #f8fafc; --bg-secondary: #ffffff; --bg-card: #ffffff; --bg-input: #f1f5f9; --bg-hover: rgba(241,245,249,0.8); --text-primary: #1e293b; --text-secondary: #64748b; --text-muted: #94a3b8; --border-color: #e2e8f0; --accent: #2563eb; --accent-bg: #dbeafe; --pre-color: #1e293b; --pre-bg: #f1f5f9; --chat-bg: #f1f5f9; --msg-user-bg: #dbeafe; --msg-user-color: #1e40af; --msg-assistant-bg: #dcfce7; --msg-assistant-color: #166534; --msg-system-bg: #f3e8ff; --msg-system-color: #7c3aed; --kv-border: #e2e8f0; } * { margin:0; padding:0; box-sizing:border-box; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif } body { background:var(--bg-primary); color:var(--text-primary); min-height:100vh; transition:background .2s,color .2s } nav { background:var(--bg-secondary); padding:0 24px; display:flex; align-items:center; gap:4px; border-bottom:1px solid var(--border-color); height:48px; position:sticky; top:0; z-index:100 } nav h1 { font-size:16px; font-weight:700; color:var(--accent); margin-right:24px; white-space:nowrap } nav a { padding:12px 16px; color:var(--text-secondary); text-decoration:none; font-size:13px; cursor:pointer; border-bottom:2px solid transparent; transition:all .15s } nav a:hover { color:var(--text-primary) } nav a.active { color:var(--accent); border-bottom-color:var(--accent) } .theme-btn { background:none; border:1px solid var(--border-color); color:var(--text-secondary); cursor:pointer; padding:4px 8px; border-radius:6px; font-size:14px; line-height:1; transition:all .15s } .theme-btn:hover { color:var(--accent); border-color:var(--accent) } .container { padding:20px 24px; max-width:1440px; margin:0 auto } .card { background:var(--bg-card); border:1px solid var(--border-color); border-radius:10px; padding:20px; margin-bottom:16px; transition:background .2s,border .2s } .card h2 { font-size:15px; font-weight:600; margin-bottom:12px; color:var(--text-primary) } .card h3 { font-size:13px; font-weight:600; color:var(--text-secondary); margin:16px 0 8px } .grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px } .grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px } .grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:16px } .stat-value { font-size:26px; font-weight:700; color:var(--accent) } .stat-label { font-size:11px; color:var(--text-muted); margin-top:2px } .stat-card { padding:16px 20px } .status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px } .dot-green { background:#22c55e } .dot-yellow { background:#eab308 } .dot-red { background:#ef4444 } .dot-gray { background:#475569 } table { width:100%; border-collapse:collapse; font-size:13px } th { text-align:left; padding:8px 10px; color:var(--text-muted); font-weight:500; border-bottom:1px solid var(--border-color); font-size:11px; text-transform:uppercase; letter-spacing:.5px } td { padding:8px 10px; border-bottom:1px solid var(--kv-border) } tr:hover td { background:var(--bg-hover) } .badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:500 } .badge-green { background:#166534; color:#86efac } .badge-red { background:#7f1d1d; color:#fca5a5 } .badge-yellow { background:#713f12; color:#fde68a } .badge-blue { background:#1e3a5f; color:#93c5fd } .btn { padding:6px 14px; border-radius:6px; border:none; font-size:12px; cursor:pointer; font-weight:500; transition:all .15s } .btn-primary { background:var(--accent); color:#fff } .btn-primary:hover { filter:brightness(1.1) } .btn-primary:disabled { opacity:.5; cursor:not-allowed } .btn-danger { background:#dc2626; color:#fff } .btn-danger:hover { background:#b91c1c } .btn-sm { padding:4px 10px; font-size:11px } .btn-ghost { background:transparent; border:1px solid var(--border-color); color:var(--text-secondary); cursor:pointer; padding:6px 14px; border-radius:6px; font-size:12px } .btn-ghost:hover { background:var(--bg-hover); color:var(--text-primary) } .tab-content { display:none } .tab-content.active { display:block } input,textarea,select { background:var(--bg-input); border:1px solid var(--border-color); border-radius:6px; padding:8px 12px; color:var(--text-primary); font-size:13px; width:100%; margin-bottom:10px; outline:none; transition:border .15s } input:focus,textarea:focus,select:focus { border-color:var(--accent) } textarea { resize:vertical; min-height:80px; font-family:monospace; font-size:12px } label { display:block; font-size:11px; color:var(--text-secondary); margin-bottom:3px; font-weight:500 } pre { background:var(--pre-bg); border-radius:6px; padding:12px; font-size:12px; overflow-x:auto; color:var(--pre-color); font-family:monospace; max-height:400px; overflow-y:auto } code { font-family:monospace; font-size:12px; color:var(--pre-color) } .settings-layout { display:flex; gap:20px; min-height:60vh } .settings-sidebar { width:200px; flex-shrink:0; background:var(--bg-card); border:1px solid var(--border-color); border-radius:10px; padding:8px 0; overflow-y:auto; max-height:70vh } .settings-sidebar a { display:block; padding:9px 16px; color:var(--text-secondary); font-size:13px; cursor:pointer; border-left:3px solid transparent; transition:all .1s } .settings-sidebar a:hover { background:var(--bg-primary); color:var(--text-primary) } .settings-sidebar a.active { background:var(--bg-primary); color:var(--accent); border-left-color:var(--accent) } .settings-content { flex:1; min-width:0 } .settings-key { font-family:monospace; font-size:11px; color:var(--text-muted); margin-bottom:2px } .reasoning { border-left:2px solid #888; padding-left:12px; margin:8px 0; font-size:12px; color:#999 } .reasoning-title { cursor:pointer; font-size:11px; color:#666; font-weight:600; user-select:none; margin-bottom:4px } .reasoning-body { color:#999; line-height:1.5 } .msg-content .text h1,.msg-content .text h2,.msg-content .text h3 { font-size:1em; margin:8px 0 4px } .msg-content .text p { margin:4px 0; line-height:1.5 } .msg-content .text ul,.msg-content .text ol { padding-left:20px; margin:4px 0 } .msg-content .text li { margin:2px 0 } .msg-content .text code { background:var(--pre-bg); padding:1px 4px; border-radius:3px; font-size:11px } .msg-content .text pre { background:var(--pre-bg); border-radius:6px; padding:10px; margin:8px 0; overflow-x:auto; font-size:11px; max-height:300px } .msg-content .text pre code { background:none; padding:0 } .msg-content .text blockquote { border-left:3px solid var(--border-color); padding-left:10px; margin:8px 0; color:var(--text-secondary) } .msg-content .text table { border-collapse:collapse; margin:8px 0; font-size:12px; width:100% } .msg-content .text th,.msg-content .text td { border:1px solid var(--border-color); padding:4px 8px; text-align:left } .toast { position:fixed; bottom:20px; right:20px; background:var(--toast-bg); color:var(--toast-color); padding:10px 20px; border-radius:8px; font-size:13px; display:none; z-index:9999; box-shadow:0 4px 12px rgba(0,0,0,.3) } .toast.error { background:var(--toast-error-bg); color:var(--toast-error-color) } .empty-state { text-align:center; padding:40px 20px; color:var(--text-muted) } .chat-layout { display:flex; gap:16px; height:calc(100vh - 100px); min-height:60vh; overflow:hidden } .chat-main { flex:2; min-width:0; display:flex; flex-direction:column } .chat-main .card { flex:1; display:flex; flex-direction:column; margin-bottom:0 } .chat-messages { flex:1; overflow-y:auto; padding:12px; border:1px solid var(--border-color); border-radius:8px; background:var(--chat-bg); display:flex; flex-direction:column; gap:4px } .msg { display:flex; gap:8px; margin-bottom:2px; align-items:flex-start; max-width:85% } .msg-user { flex-direction:row-reverse; align-self:flex-end } .msg-assistant { align-self:flex-start } .msg-system { align-self:center; max-width:90% } .msg-avatar { width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0 } .msg-user .msg-avatar { background:var(--msg-user-bg); color:var(--msg-user-color) } .msg-assistant .msg-avatar { background:var(--msg-assistant-bg); color:var(--msg-assistant-color) } .msg-system .msg-avatar { background:var(--msg-system-bg); color:var(--msg-system-color) } .msg-bubble { padding:8px 12px; border-radius:10px; font-size:13px; line-height:1.5; word-break:break-word } .msg-user .msg-bubble { background:var(--msg-user-bg); color:var(--msg-user-color); border-bottom-right-radius:4px } .msg-assistant .msg-bubble { background:var(--msg-assistant-bg); color:var(--msg-assistant-color); border-bottom-left-radius:4px } .msg-system .msg-bubble { background:var(--msg-system-bg); color:var(--msg-system-color); text-align:center; font-size:12px } .msg-bubble .text { white-space:pre-wrap } .msg-bubble .text p { margin:4px 0 } .msg-bubble .text pre { background:var(--pre-bg); border-radius:6px; padding:8px; margin:4px 0; overflow-x:auto; font-size:11px; max-height:200px } .msg-bubble .text code { background:var(--pre-bg); padding:1px 4px; border-radius:3px; font-size:11px } .msg-bubble .text pre code { background:none; padding:0 } .msg-bubble .reasoning { border-left:2px solid rgba(255,255,255,0.2); padding-left:8px; margin:6px 0; font-size:11px; opacity:0.7 } .msg-bubble .reasoning-title { cursor:pointer; font-size:10px; font-weight:600; user-select:none; margin-bottom:2px } .msg-bubble .tool-call { background:rgba(0,0,0,0.15); border-radius:6px; padding:6px 8px; margin:4px 0; font-size:11px; border-left:2px solid var(--accent) } .msg-bubble .tool-call .tc-name { font-weight:600; color:var(--accent) } .msg-bubble .tool-call .tc-args { font-family:monospace; font-size:10px; opacity:0.7; white-space:pre-wrap; word-break:break-all; margin-top:2px } .msg-bubble .tool-call .tc-result { font-family:monospace; font-size:10px; opacity:0.6; white-space:pre-wrap; word-break:break-all; margin-top:2px; max-height:80px; overflow-y:auto } .chat-input-row { display:flex; gap:8px; flex-shrink:0; padding-top:10px } .chat-input-row input { flex:1; margin-bottom:0 } .chat-input-row button { flex-shrink:0; margin-bottom:0 } .chat-sidebar { flex:1; min-width:240px; max-width:340px; overflow-y:auto; display:flex; flex-direction:column; gap:12px } .chat-sidebar .card { margin-bottom:0 } .loading { display:inline-block; width:16px; height:16px; border:2px solid var(--border-color); border-radius:50%; border-top-color:var(--accent); animation:spin .6s linear infinite } @keyframes spin { to { transform:rotate(360deg) } } .kv-row { display:flex; padding:6px 0; border-bottom:1px solid var(--kv-border); font-size:13px } .kv-row .key { color:var(--text-muted); width:180px; flex-shrink:0 } .kv-row .val { color:var(--text-primary); word-break:break-all } .loading-spinner { width:32px; height:32px; border:3px solid rgba(68,136,255,0.15); border-top:3px solid #4488ff; border-radius:50%; animation:spin 0.8s linear infinite; margin:20px auto } #starmap-container { position:relative; overflow:hidden } #starmap-container canvas { display:block } #starmap-placeholder { display:flex; align-items:center; justify-content:center; height:100%; width:100% } .sidebar-subnav { display:flex; gap:0; border-bottom:1px solid var(--border-color); margin-bottom:10px } .sidebar-subnav span { padding:6px 12px; font-size:12px; cursor:pointer; color:var(--text-muted); border-bottom:2px solid transparent; transition:all .15s } .sidebar-subnav span:hover { color:var(--text-primary) } .sidebar-subnav span.active { color:var(--accent); border-bottom-color:var(--accent) } /* Connection Manager */ .overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); display:none; align-items:center; justify-content:center; z-index:1000 } .overlay-content { background:var(--bg-card); border:1px solid var(--border-color); border-radius:12px; padding:28px; width:520px; max-height:80vh; overflow-y:auto } .overlay-content h2 { font-size:18px; margin-bottom:16px; color:var(--text-primary) } .conn-item { display:flex; align-items:center; gap:12px; padding:12px 16px; border:1px solid var(--border-color); border-radius:8px; margin-bottom:8px; cursor:pointer; transition:all .15s } .conn-item:hover { background:var(--bg-hover); border-color:var(--accent) } .conn-item.active { border-color:var(--accent); background:var(--accent-bg) } .conn-item .conn-info { flex:1; min-width:0 } .conn-item .conn-name { font-size:14px; font-weight:600; color:var(--text-primary) } .conn-item .conn-url { font-size:11px; color:var(--text-muted); margin-top:2px } .conn-item .conn-actions { display:flex; gap:4px; flex-shrink:0 } .conn-form h3 { font-size:15px; margin-bottom:12px } .conn-form-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:12px } .conn-indicator { display:flex; align-items:center; gap:4px; cursor:pointer; padding:4px 10px; border-radius:6px; font-size:12px; color:var(--text-secondary); transition:all .15s; user-select:none } .conn-indicator:hover { background:var(--bg-hover); color:var(--text-primary) } @media(max-width:768px) { nav { padding:0 8px; gap:2px } nav h1 { font-size:13px; margin-right:8px } nav a { padding:8px 6px; font-size:11px } .container { padding:12px } .card { padding:12px } .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr } .stat-value { font-size:20px } .settings-layout { flex-direction:column } .settings-sidebar { width:100%; max-height:200px; display:flex; flex-wrap:wrap; padding:4px } .settings-sidebar a { display:inline-block; padding:6px 12px; border-left:none; border-bottom:2px solid transparent } .settings-sidebar a.active { border-left:none; border-bottom-color:var(--accent) } .kv-row { flex-direction:column; gap:2px } .kv-row .key { width:auto } .chat-layout { flex-direction:column; height:auto } .chat-sidebar { max-width:none } .msg { max-width:95% } }