:root{color:#1f2937;background:#f5f7fb;--app-bg: #f5f7fb;--surface: #ffffff;--surface-muted: #f8fafc;--surface-raised: #ffffff;--border: #dbe3ef;--border-strong: #cbd5e1;--text: #0f172a;--text-body: #1f2937;--text-muted: #64748b;--text-soft: #475569;--primary: #2563eb;--primary-soft: #eff6ff;--button-muted: #eef2f7;--button-muted-hover: #e2e8f0;--success-bg: #dcfce7;--success-text: #166534;--error-bg: #fef2f2;--error-text: #b91c1c;--error-border: #fecaca;--preview-bg: #0f172a;--preview-text: #e2e8f0;--shadow: 0 18px 60px rgba(15, 23, 42, .08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:root[data-theme=dark]{color:#e5e7eb;background:#0b1120;--app-bg: #0b1120;--surface: #111827;--surface-muted: #0f172a;--surface-raised: #172033;--border: #263244;--border-strong: #334155;--text: #f8fafc;--text-body: #e5e7eb;--text-muted: #94a3b8;--text-soft: #cbd5e1;--primary: #60a5fa;--primary-soft: #172554;--button-muted: #1e293b;--button-muted-hover: #334155;--success-bg: #052e16;--success-text: #86efac;--error-bg: #450a0a;--error-text: #fecaca;--error-border: #7f1d1d;--preview-bg: #020617;--preview-text: #dbeafe;--shadow: 0 18px 60px rgba(0, 0, 0, .28)}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:var(--app-bg);color:var(--text-body)}button,input,textarea,select{font:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid rgba(37,99,235,.18);outline-offset:2px}.app-shell{min-height:100vh}.empty-state{display:grid;min-height:100vh;place-items:center;padding:32px;text-align:center}.app-shell>.empty-state{min-height:calc(100vh - 57px)}.empty-state h1{margin:0 0 8px;font-size:32px}.empty-state p{margin:0;color:var(--text-muted)}.login-page{display:grid;min-height:100vh;place-items:center;padding:24px}.login-panel{display:grid;width:min(420px,100%);gap:16px;padding:28px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.login-heading{display:grid;gap:6px}.login-heading h1{margin:0;color:var(--text);font-size:28px;line-height:1.15}.login-heading p{margin:0;color:var(--text-muted)}.login-panel label{display:grid;gap:6px;color:var(--text-soft);font-size:14px;font-weight:600}.login-panel input{min-height:42px;border:1px solid var(--border-strong);border-radius:6px;padding:0 12px;color:var(--text);background:var(--surface)}.login-panel input:focus{border-color:var(--primary);outline:3px solid rgba(37,99,235,.16)}.login-panel button,.icon-button{display:inline-flex;align-items:center;justify-content:center;border:0;cursor:pointer}.login-panel button{min-height:42px;gap:8px;border-radius:6px;background:var(--primary);color:#fff;font-weight:700}.login-panel button:disabled,.icon-button:disabled{cursor:not-allowed;opacity:.65}.form-error{margin:0;color:var(--error-text);font-size:14px}.top-bar{display:flex;height:56px;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);background:var(--surface);padding:0 20px}.top-bar strong{color:var(--text)}.user-controls{display:inline-flex;align-items:center;gap:12px;min-width:0}.user-controls span{overflow:hidden;color:var(--text-soft);text-overflow:ellipsis;white-space:nowrap}.icon-button{width:36px;height:36px;flex:0 0 auto;border-radius:6px;background:var(--button-muted);color:var(--text-soft)}.icon-button:hover:not(:disabled){background:var(--button-muted-hover)}.lab-layout{display:grid;grid-template-columns:220px minmax(300px,.7fr) minmax(620px,1.3fr);height:calc(100vh - 57px);min-height:0;overflow:hidden}.session-sidebar,.config-panel{overflow:auto;max-height:100%;border-right:1px solid var(--border);background:var(--surface);padding:16px}.config-panel{border-right:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:12px 16px;border-left:1px solid var(--border)}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px;grid-column:1 / -1}.panel-heading h2,.chat-header h1,.config-section h3{margin:0;color:var(--text)}.panel-heading h2,.chat-header h1{font-size:18px;line-height:1.2}.panel-heading p,.chat-header p,.field-note,.muted-text,.empty-copy{margin:4px 0 0;color:var(--text-muted);font-size:13px}.primary-button,.chat-input button{display:inline-flex;min-height:38px;align-items:center;justify-content:center;gap:8px;border:0;border-radius:6px;background:var(--primary);color:#fff;cursor:pointer;font-weight:700}.primary-button{width:100%}.primary-button:disabled,.chat-input button:disabled{cursor:not-allowed;opacity:.62}.session-list{display:grid;gap:8px;margin-top:16px}.session-item{display:grid;gap:4px;width:100%;border:1px solid var(--border);border-radius:6px;background:var(--surface);padding:10px;text-align:left;cursor:pointer}.session-item:hover{border-color:var(--text-muted)}.session-item.active{border-color:var(--primary);background:var(--primary-soft)}.session-item strong{overflow:hidden;color:var(--text);text-overflow:ellipsis;white-space:nowrap}.session-item span,.session-item small{overflow:hidden;color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap}.chat-runner{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;background:var(--surface-muted)}.chat-header{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);background:var(--surface);padding:12px 16px}.chat-header>div:first-child{min-width:0}.chat-header h1,.chat-header p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-metrics{display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-metrics span,.pill{border-radius:999px;background:var(--button-muted);padding:4px 8px;color:var(--text-soft);font-size:12px;font-weight:700}.turn-list{display:grid;align-content:start;gap:12px;overflow:auto;padding:14px}.turn-card{display:grid;gap:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface-raised);padding:12px}.turn-row{display:grid;gap:5px}.turn-row span{color:var(--text-muted);font-size:12px;font-weight:700;text-transform:uppercase}.turn-row p{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.turn-row.user p{color:var(--text-soft);font-weight:700}.turn-row.assistant p{color:var(--text-body)}.turn-card footer{display:flex;flex-wrap:wrap;gap:8px 12px;color:var(--text-muted);font-size:12px}.turn-card footer span{display:inline-flex;align-items:center;gap:4px}.pill.ok{background:var(--success-bg);color:var(--success-text)}.pill.error,.status-banner.error{background:var(--error-bg);color:var(--error-text)}.status-banner{display:flex;align-items:center;gap:8px;margin:0;border:1px solid var(--error-border);border-radius:6px;padding:10px 12px;font-size:13px}.empty-copy{margin:48px auto;max-width:360px;text-align:center}.chat-input{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:12px;border-top:1px solid var(--border);background:var(--surface);padding:12px 14px}.chat-input textarea{min-height:58px;max-height:180px;resize:vertical}.config-section{display:grid;gap:10px;min-width:0;padding:14px 0;border-top:1px solid var(--border)}.config-section:first-of-type{border-top:0;padding-top:0}.config-section h3{font-size:14px}.config-panel label{display:grid;gap:6px;color:var(--text-soft);font-size:13px;font-weight:700}.config-panel input,.config-panel textarea,.chat-input textarea{width:100%;border:1px solid var(--border-strong);border-radius:6px;background:var(--surface);color:var(--text);padding:9px 10px}.config-panel textarea{min-height:70px;resize:vertical}.check-row{grid-template-columns:auto minmax(0,1fr);align-items:center;justify-content:start}.check-row input{width:16px;height:16px}.field-note{margin-top:-4px;line-height:1.4}.preview{max-height:360px;overflow:auto;grid-column:1 / -1;max-height:220px;border:1px solid var(--border-strong);border-radius:6px;background:var(--preview-bg);color:var(--preview-text);font-size:12px;line-height:1.5;padding:12px;white-space:pre-wrap}.preview.error{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}.config-section:has(.preview){grid-column:1 / -1}@media(max-width:520px){.login-panel{padding:22px}.top-bar{padding:0 14px}}@media(max-width:1180px){.lab-layout{grid-template-columns:200px minmax(0,1fr)}.config-panel{grid-column:1 / -1;max-height:46vh;border-top:1px solid var(--border);border-left:0}}@media(max-width:760px){.lab-layout{grid-template-columns:1fr;grid-template-rows:150px minmax(0,1fr) minmax(0,1fr);height:calc(100vh - 57px);min-height:0;overflow:hidden}.session-sidebar,.config-panel{grid-template-columns:1fr;border-right:0;border-bottom:1px solid var(--border)}.chat-runner,.config-panel,.session-sidebar{min-height:0}.chat-header,.chat-input{grid-template-columns:1fr;padding:14px}.chat-header{display:grid}.chat-metrics{justify-content:flex-start}.turn-list{padding:14px}}
