:root{--bg: #f5f6f9;--surface: #ffffff;--surface-2: #fafbfc;--border: #e4e7ee;--border-strong: #d3d8e3;--text: #1c2130;--muted: #687087;--muted-2: #8b93a7;--accent: #4f46e5;--accent-hover: #4338ca;--accent-soft: #eef0ff;--sidebar: #232a3d;--sidebar-2: #1c2233;--sidebar-text: #c6cddd;--sidebar-muted: #8b95ad;--success: #12805c;--success-soft: #e6f6ef;--warn: #a15c07;--warn-soft: #fdf3e2;--danger: #c02636;--danger-soft: #fdecee;--info: #1e5fa8;--info-soft: #eaf2fc;--radius: 8px;--radius-sm: 6px;--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);--shadow-md: 0 8px 24px rgba(16, 24, 40, .1);--shadow-lg: 0 20px 48px rgba(16, 24, 40, .18);--sidebar-w: 244px;--topbar-h: 56px;--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:13px;line-height:1.45;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit;color:inherit}h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.01em}h1{font-size:20px}h2{font-size:16px}h3{font-size:14px}code,pre{font-family:var(--mono);font-size:12px}.shell{display:flex;min-height:100vh}.sidebar{width:var(--sidebar-w);flex:0 0 var(--sidebar-w);background:var(--sidebar);color:var(--sidebar-text);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;z-index:20}.sidebar-brand{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.07);color:#fff;min-height:var(--topbar-h)}.sidebar-brand .logo{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-weight:700;font-size:13px}.sidebar-brand strong{font-size:14px;font-weight:600;letter-spacing:.01em}.sidebar-brand small{display:block;font-size:10.5px;color:var(--sidebar-muted);letter-spacing:.04em;text-transform:uppercase}.nav{padding:10px 10px 24px}.nav-group-label{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--sidebar-muted);padding:14px 10px 6px}.nav-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--radius-sm);color:var(--sidebar-text);font-size:13px;margin-bottom:1px;cursor:pointer;border-left:2px solid transparent}.nav-item:hover{background:#ffffff0f;color:#fff;text-decoration:none}.nav-item.active{background:#ffffff1c;color:#fff;font-weight:500}.nav-item svg{width:16px;height:16px;opacity:.85;flex:0 0 16px}.nav-item .nav-badge{margin-left:auto;background:#ef4444;color:#fff;font-size:10px;font-weight:600;border-radius:9px;padding:1px 6px;min-width:18px;text-align:center}.sidebar-footer{margin-top:auto;padding:12px 16px;border-top:1px solid rgba(255,255,255,.07);font-size:11px;color:var(--sidebar-muted)}.main{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:var(--topbar-h);flex:0 0 var(--topbar-h);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px;position:sticky;top:0;z-index:15}.topbar-title{font-size:14px;font-weight:600;color:var(--text);white-space:nowrap}.topbar-spacer{flex:1}.topbar-search{position:relative;width:300px;max-width:34vw}.topbar-search input{width:100%;height:32px;padding:0 10px 0 30px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);font-size:12.5px}.topbar-search svg{position:absolute;left:9px;top:8px;width:14px;height:14px;color:var(--muted-2)}.topbar-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:var(--radius-sm);border:1px solid transparent;background:transparent;color:var(--muted);cursor:pointer;position:relative}.topbar-icon:hover{background:var(--surface-2);border-color:var(--border)}.topbar-icon svg{width:16px;height:16px}.topbar-icon .dot{position:absolute;top:5px;right:5px;width:6px;height:6px;border-radius:50%;background:#ef4444}.avatar{width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:11px;font-weight:600;text-transform:uppercase}.user-chip{display:flex;align-items:center;gap:8px;padding:3px 8px 3px 3px;border-radius:20px;cursor:pointer}.user-chip:hover{background:var(--surface-2)}.user-chip-name{font-size:12.5px;font-weight:500}.user-chip-role{font-size:10.5px;color:var(--muted-2);text-transform:capitalize}.content{padding:20px 24px 40px;max-width:1600px;width:100%}.page-head{display:flex;align-items:flex-start;gap:16px;margin-bottom:18px;flex-wrap:wrap}.page-head h1{font-size:19px}.page-head p{margin:3px 0 0;color:var(--muted);font-size:12.5px}.page-head-actions{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.card-head{display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid var(--border)}.card-head h2{font-size:13.5px;font-weight:600}.card-head .spacer{flex:1}.card-body{padding:16px}.card+.card{margin-top:16px}.grid{display:grid;gap:16px}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}@media (max-width: 1180px){.grid.cols-4,.grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 860px){.grid.cols-2,.grid.cols-3,.grid.cols-4{grid-template-columns:minmax(0,1fr)}.sidebar{position:fixed;left:0;top:0;transform:translate(-100%);transition:transform .18s ease}.sidebar.open{transform:translate(0);box-shadow:var(--shadow-lg)}.content{padding:16px}.topbar-search{display:none}.main{width:100%}}.stat{padding:15px 16px}.stat-label{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2);font-weight:600}.stat-value{font-size:24px;font-weight:650;margin-top:6px;letter-spacing:-.02em}.stat-hint{font-size:11.5px;color:var(--muted);margin-top:4px}.stat-accent{color:var(--accent)}.table-wrap{overflow:auto;border-radius:var(--radius)}table.data{width:100%;border-collapse:collapse;font-size:12.5px}table.data th{text-align:left;font-weight:600;font-size:11.5px;color:var(--muted);background:var(--surface-2);padding:9px 12px;border-bottom:1px solid var(--border);white-space:nowrap;position:sticky;top:0;z-index:1}table.data td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:middle}table.data tbody tr:hover{background:#fafbff}table.data tbody tr.selected{background:var(--accent-soft)}table.data td.mono,table.data th.mono{font-family:var(--mono);font-size:11.5px}table.data .row-title{font-weight:500;color:var(--text)}.table-empty{padding:36px 16px;text-align:center;color:var(--muted);font-size:12.5px}.table-footer{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid var(--border);font-size:12px;color:var(--muted)}.pager{display:flex;gap:4px;margin-left:auto;align-items:center}.pager button{min-width:28px;height:28px;border:1px solid var(--border);background:var(--surface);border-radius:var(--radius-sm);cursor:pointer;font-size:12px}.pager button.active{border-color:var(--accent);color:var(--accent);background:var(--accent-soft);font-weight:600}.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}.field>label{font-size:11.5px;font-weight:600;color:var(--muted);letter-spacing:.01em}.field .hint{font-size:11px;color:var(--muted-2)}.field .error{font-size:11.5px;color:var(--danger)}.input,.select,.textarea{width:100%;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);padding:0 10px;height:32px;font-size:12.5px;outline:none}.textarea{height:auto;min-height:88px;padding:8px 10px;resize:vertical;line-height:1.5}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #4f46e51f}.input:disabled,.select:disabled{background:var(--surface-2);color:var(--muted)}.select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687087' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;padding-right:28px}.filter-bar{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-end;margin-bottom:14px}.filter-bar .field{margin-bottom:0;min-width:150px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 12px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--surface);color:var(--text);font-size:12.5px;font-weight:500;cursor:pointer;white-space:nowrap;transition:background .12s,border-color .12s}.btn:hover{background:var(--surface-2)}.btn svg{width:14px;height:14px}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent-hover)}.btn.danger{background:var(--danger);border-color:var(--danger);color:#fff}.btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}.btn.ghost:hover{background:var(--surface-2);color:var(--text)}.btn.sm{height:26px;padding:0 9px;font-size:11.5px}.btn:disabled{opacity:.55;cursor:not-allowed}.btn-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.icon-btn{width:28px;height:28px;padding:0}.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600;background:var(--surface-2);color:var(--muted);border:1px solid var(--border);white-space:nowrap;text-transform:capitalize}.badge .dot{width:6px;height:6px;border-radius:50%;background:currentColor}.badge.green{background:var(--success-soft);color:var(--success);border-color:#bfe7d6}.badge.amber{background:var(--warn-soft);color:var(--warn);border-color:#f3ddb4}.badge.red{background:var(--danger-soft);color:var(--danger);border-color:#f5c8cd}.badge.blue{background:var(--info-soft);color:var(--info);border-color:#c6ddf5}.badge.violet{background:var(--accent-soft);color:var(--accent);border-color:#d8d9fb}.badge.gray{background:#f1f3f7;color:#5b6478}.kv{display:grid;grid-template-columns:140px 1fr;gap:8px 14px;font-size:12.5px}.kv dt{color:var(--muted);font-size:12px}.kv dd{margin:0;word-break:break-word}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#11162373;display:grid;place-items:center;z-index:100;padding:24px;overflow:auto}.modal{background:var(--surface);border-radius:10px;box-shadow:var(--shadow-lg);width:100%;max-width:560px;max-height:92vh;display:flex;flex-direction:column}.modal.wide{max-width:860px}.modal-head{padding:16px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center}.modal-head h2{font-size:14.5px}.modal-body{padding:18px;overflow:auto}.modal-foot{padding:12px 18px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:8px}.modal-close{margin-left:auto}.toast-stack{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:8px;z-index:200}.toast{background:#1f2534;color:#fff;border-radius:var(--radius);padding:10px 14px;font-size:12.5px;box-shadow:var(--shadow-md);max-width:420px;display:flex;gap:8px;align-items:flex-start}.toast.error{background:#7f1d24}.toast.success{background:#115e46}.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:16px}.tab{padding:8px 12px;font-size:12.5px;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent;background:none;border-top:0;border-left:0;border-right:0}.tab:hover{color:var(--text)}.tab.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}.chip-row{display:flex;gap:6px;flex-wrap:wrap}.muted{color:var(--muted)}.small{font-size:11.5px}.mono{font-family:var(--mono)}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.dot-pulse{width:7px;height:7px;border-radius:50%;background:var(--accent);animation:pulse 1.4s infinite;display:inline-block}@keyframes pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.divider{height:1px;background:var(--border);margin:16px 0}.empty{padding:40px 20px;text-align:center;color:var(--muted)}.empty h3{margin-bottom:6px;color:var(--text)}.empty p{margin:0 0 14px;font-size:12.5px}.alert{border-radius:var(--radius-sm);padding:10px 12px;font-size:12.5px;display:flex;gap:8px;align-items:flex-start}.alert.warn{background:var(--warn-soft);color:#7c4a08;border:1px solid #f3ddb4}.alert.error{background:var(--danger-soft);color:#8c1c27;border:1px solid #f5c8cd}.alert.info{background:var(--info-soft);color:#144a80;border:1px solid #c6ddf5}.alert.success{background:var(--success-soft);color:#0d624a;border:1px solid #bfe7d6}.log-view{background:#11161f;color:#d5dbe7;border-radius:var(--radius-sm);padding:12px;font-family:var(--mono);font-size:11.5px;line-height:1.55;max-height:460px;overflow:auto;white-space:pre-wrap;word-break:break-word}.log-line{display:flex;gap:8px}.log-line .ts{color:#6b7688;flex:0 0 auto}.log-line.error{color:#ff8f9a}.log-line.state{color:#a9b7ff}.log-line.test{color:#7ee0b8}.log-line.review{color:#ffd79a}.diff{font-family:var(--mono);font-size:11.5px;line-height:1.5;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:auto;max-height:520px;background:var(--surface)}.diff-line{display:flex;white-space:pre-wrap;word-break:break-word}.diff-line .ln{flex:0 0 44px;text-align:right;padding:0 8px;color:var(--muted-2);background:var(--surface-2);-webkit-user-select:none;user-select:none}.diff-line .tx{flex:1;padding:0 10px}.diff-line.add{background:#e9f8f0}.diff-line.add .tx{color:#0f6a4d}.diff-line.del{background:#fdeef0}.diff-line.del .tx{color:#9d212f}.diff-line.hunk{background:#eef2fb;color:#3b5b9a}.diff-line.meta{background:var(--surface-2);color:var(--muted)}.studio{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}@media (max-width: 1180px){.studio{grid-template-columns:minmax(0,1fr)}}.chat-card{display:flex;flex-direction:column;height:calc(100vh - 150px);min-height:480px}.chat-body{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px;background:var(--surface-2)}.msg{display:flex;gap:10px;max-width:92%}.msg.user{align-self:flex-end;flex-direction:row-reverse}.msg-avatar{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:10px;font-weight:700;flex:0 0 26px}.msg.user .msg-avatar{background:var(--accent);color:#fff}.msg.assistant .msg-avatar{background:#e8ecff;color:var(--accent)}.msg-bubble{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:10px 13px;font-size:12.5px;line-height:1.6;box-shadow:var(--shadow-sm)}.msg.user .msg-bubble{background:var(--accent);border-color:var(--accent);color:#fff}.msg-meta{font-size:10.5px;color:var(--muted-2);margin-top:5px}.chat-input{border-top:1px solid var(--border);padding:12px;display:flex;gap:8px;align-items:flex-end;background:var(--surface)}.chat-input textarea{flex:1;min-height:44px;max-height:160px}.markdown p{margin:0 0 8px}.markdown p:last-child{margin-bottom:0}.markdown pre{background:#11161f;color:#d5dbe7;padding:10px;border-radius:6px;overflow:auto;margin:8px 0}.markdown code{background:#0000000f;padding:1px 4px;border-radius:3px}.markdown pre code{background:none;padding:0}.markdown ul,.markdown ol{margin:4px 0 8px;padding-left:20px}.markdown h1,.markdown h2,.markdown h3{font-size:13.5px;margin:10px 0 6px}.bars{display:flex;align-items:flex-end;gap:4px;height:120px}.bars .bar{flex:1;background:linear-gradient(180deg,#6366f1,#4f46e5);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}.bars .bar:hover{opacity:1}.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--muted)}.legend .swatch{width:9px;height:9px;border-radius:2px;display:inline-block;margin-right:5px}.progress{height:6px;background:var(--surface-2);border-radius:4px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--accent)}.auth-wrap{min-height:100vh;display:grid;grid-template-columns:1.05fr 1fr;background:var(--surface)}@media (max-width: 900px){.auth-wrap{grid-template-columns:1fr}.auth-hero{display:none}}.auth-hero{background:radial-gradient(1200px 500px at 10% 10%,#3b3f8f 0%,transparent 60%),radial-gradient(900px 400px at 90% 80%,#6d28d9 0%,transparent 55%),linear-gradient(160deg,#1b2133,#232a3d 60%,#2a2f4d);color:#e9ecf8;padding:56px;display:flex;flex-direction:column;justify-content:space-between}.auth-hero h1{font-size:30px;line-height:1.2;letter-spacing:-.03em;color:#fff}.auth-hero p{color:#c3c9e2;max-width:460px;font-size:13.5px;line-height:1.7}.auth-feature{display:flex;gap:10px;align-items:flex-start;margin-top:18px;font-size:12.5px;color:#d6dbef}.auth-feature svg{width:16px;height:16px;color:#a5b4fc;flex:0 0 16px;margin-top:1px}.auth-form-wrap{display:grid;place-items:center;padding:40px}.auth-form{width:100%;max-width:380px}.auth-form h2{font-size:20px;margin-bottom:4px}.auth-form .sub{color:var(--muted);font-size:12.5px;margin-bottom:22px}.auth-divider{display:flex;align-items:center;gap:10px;color:var(--muted-2);font-size:11px;margin:16px 0;text-transform:uppercase;letter-spacing:.06em}.auth-divider:before,.auth-divider:after{content:"";flex:1;height:1px;background:var(--border)}
