/* ---------- AI LAB ---------- */
.lab-panel{
  border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--panel); overflow:hidden;
}
.lab-panel-head{
  display:flex; align-items:center; gap:10px; padding:12px 18px; border-bottom:1px solid var(--line);
  font-size:12px; color:var(--text-dim);
}
.lab-dot{width:7px; height:7px; border-radius:50%; background:var(--signal); box-shadow:0 0 6px var(--signal);}
.lab-clear{margin-left:auto; font-size:11px; color:var(--text-faint); border:1px solid var(--line-strong); padding:4px 10px; border-radius:var(--radius-sm); transition:color var(--dur-fast), border-color var(--dur-fast);}
.lab-clear:hover{color:var(--text); border-color:var(--text-dim);}

.lab-log{
  padding:20px; min-height:220px; max-height:420px; overflow-y:auto;
  display:flex; flex-direction:column; gap:16px;
}
.chat-msg{max-width:80%;}
.chat-role{font-size:10px; color:var(--text-faint); margin:0 0 4px; letter-spacing:.08em;}
.chat-text{margin:0; font-size:15.2px; line-height:1.6; white-space:pre-wrap;}
.chat-sys{max-width:100%; color:var(--text-dim);}
.chat-user{align-self:flex-end; text-align:right;}
.chat-user .chat-text{background:var(--bg-raised); padding:10px 14px; border-radius:var(--radius-md); display:inline-block;}
.chat-ai .chat-text{background:transparent; border-left:2px solid var(--accent); padding-left:12px;}
.chat-error .chat-text{color:var(--danger);}
.chat-meta{font-size:10px; color:var(--text-faint); margin-top:4px;}
.chat-loading{display:flex; gap:4px; padding-left:2px;}
.chat-loading span{width:5px; height:5px; border-radius:50%; background:var(--text-faint); animation:pulseDot 1s ease-in-out infinite;}
.chat-loading span:nth-child(2){animation-delay:.15s;}
.chat-loading span:nth-child(3){animation-delay:.3s;}
@keyframes pulseDot{0%,80%,100%{opacity:.25;}40%{opacity:1;}}

.lab-input-row{
  display:flex; gap:10px; padding:16px 18px; border-top:1px solid var(--line);
}
.lab-input-row input{
  flex:1; background:var(--bg); border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  padding:12px 14px; font-size:14px;
}
.lab-input-row input:focus{outline:none; border-color:var(--accent);}
