/* ═══════════════════════════════════════════════════
   Config V2 — UX Prototype Styles
   Loaded after styles.css, provides the rich 6-tab UI.
   ═══════════════════════════════════════════════════ */

:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #dbeafe;
  --primary-soft: rgba(37,99,235,0.08);
  --purple: #8b5cf6; --purple-light: #ede9fe; --purple-dark: #6d28d9;
  --green: #059669; --green-light: #d1fae5; --green-dark: #047857;
  --orange: #d97706; --orange-light: #fef3c7; --orange-dark: #b45309;
  --red: #dc2626; --red-light: #fee2e2; --red-dark: #b91c1c;
  --cyan: #06b6d4; --cyan-light: #cffafe;
  --dark: #1e293b; --sub: #64748b; --hint: #94a3b8;
  --white: #fff; --gray: #e2e8f0; --gray-bg: #f4f6f9;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
  --radius: 12px; --radius-sm: 6px; --radius-md: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

body {
  background: var(--gray-bg); font-family: var(--font); margin: 0;
  display: block !important; height: auto !important;
}
#skills-page { min-height: 100vh; }

/* ── Top Bar (with integrated tabs) ── */
.topbar { height:60px; background:var(--white); border-bottom:1px solid var(--gray); display:flex; align-items:stretch; padding:0 20px; gap:0; position:sticky; top:0; z-index:100; box-shadow:var(--shadow); }
.topbar-back { color:var(--sub); font-size:12px; text-decoration:none; display:flex; align-items:center; padding:0 12px 0 0; flex-shrink:0; }
.topbar-back:hover { color:var(--primary); }
.topbar-brand { color:var(--dark); font-size:15px; font-weight:700; display:flex; align-items:center; gap:7px; flex-shrink:0; padding-right:12px; border-right:1px solid var(--gray); margin-right:4px; }
.topbar-brand .brand-icon { background:linear-gradient(135deg,var(--primary),var(--purple)); width:30px; height:30px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; }
.topbar-tabs { display:flex; align-items:stretch; flex:1; overflow-x:auto; -webkit-overflow-scrolling:touch; min-width:0; }
.topbar-tabs::-webkit-scrollbar { height:0; }
.topbar-right { margin-left:auto; display:flex; align-items:center; gap:10px; flex-shrink:0; padding-left:12px; }
.topbar-avatar { width:34px; height:34px; background:var(--primary); border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:13px; font-weight:600; flex-shrink:0; }

/* ── Tab items (inside topbar) ── */
.primary-tab { padding:0 16px; font-size:13px; color:var(--sub); cursor:pointer; border-bottom:2px solid transparent; transition:all .15s; display:flex; align-items:center; gap:5px; font-weight:500; white-space:nowrap; }
.primary-tab:hover { color:var(--primary); background:var(--primary-soft); }
.primary-tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.primary-tab .ptab-icon { font-size:14px; }
.primary-tab .ptab-badge { background:var(--primary-light); color:var(--primary); padding:1px 7px; border-radius:8px; font-size:10px; font-weight:600; line-height:16px; }

/* ── Section Container ── */
.section { display:none; }
.section.active { display:block; }

/* ── Cards / Panels ── */
.card { background:var(--white); border:1px solid var(--gray); border-radius:var(--radius); box-shadow:var(--shadow); }
.card-header { padding:14px 18px; border-bottom:1px solid var(--gray); display:flex; align-items:center; justify-content:space-between; }
.card-header h3 { font-size:14px; font-weight:600; display:flex; align-items:center; gap:6px; }
.card-body { padding:16px 18px; }

/* ── Buttons ── */
.btn { padding:7px 16px; border-radius:var(--radius-sm); font-size:12px; cursor:pointer; border:1px solid var(--gray); background:var(--white); color:var(--text); transition:all .2s; display:inline-flex; align-items:center; gap:5px; font-family:var(--font); }
.btn:hover { border-color:var(--primary); color:var(--primary); }
.btn-primary { background:var(--primary); color:#fff; border-color:var(--primary); }
.btn-primary:hover { background:var(--primary-dark); border-color:var(--primary-dark); color:#fff; }
.btn-green { background:var(--green); color:#fff; border-color:var(--green); }
.btn-green:hover { background:var(--green-dark); border-color:var(--green-dark); color:#fff; }
.btn-purple { background:var(--purple); color:#fff; border-color:var(--purple); }
.btn-purple:hover { background:var(--purple-dark); border-color:var(--purple-dark); color:#fff; }
.btn-sm { padding:4px 10px; font-size:11px; }
.btn-lg { padding:12px 28px; font-size:14px; font-weight:600; }
.btn-ghost { background:transparent; border:none; color:var(--sub); }
.btn-ghost:hover { color:var(--primary); background:var(--primary-light); }
.btn-danger { background:var(--red); color:#fff; border-color:var(--red); }
.btn-orange { background:var(--orange); color:#fff; border-color:var(--orange); }
.btn-orange:hover { background:var(--orange-dark); border-color:var(--orange-dark); color:#fff; }

/* ── Tags ── */
.cat-tag { display:inline-flex; padding:2px 10px; border-radius:12px; font-size:10px; font-weight:600; }
.cat-tag.core { background:#dbeafe; color:#1d4ed8; }
.cat-tag.edge { background:#fef3c7; color:#d97706; }
.cat-tag.route { background:#ede9fe; color:#6d28d9; }
.cat-tag.ok { background:#d1fae5; color:#059669; }
.cat-tag.warn { background:#fef3c7; color:#d97706; }
.cat-tag.err { background:#fee2e2; color:#dc2626; }

/* ── Forms ── */
.form-group { margin-bottom:14px; }
.form-label { display:block; font-size:11px; font-weight:600; color:var(--sub); margin-bottom:5px; text-transform:uppercase; letter-spacing:.5px; }
.form-input, .form-select, .form-textarea {
  width:100%; padding:8px 12px; border:1px solid var(--gray); border-radius:var(--radius-sm);
  font-size:13px; outline:none; font-family:var(--font); transition:border .2s; background:var(--white);
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color:var(--primary); }
.form-textarea { resize:vertical; min-height:60px; }

/* ── Table ── */
.eval-table { width:100%; border-collapse:collapse; }
.eval-table th { text-align:left; padding:10px 14px; font-size:11px; color:var(--sub); font-weight:600;
  text-transform:uppercase; letter-spacing:.5px; background:var(--gray-bg); border-bottom:1px solid var(--gray); }
.eval-table td { padding:12px 14px; border-bottom:1px solid var(--gray); font-size:13px; vertical-align:top; }
.eval-table tr:hover td { background:#f8faff; }

/* ── Misc ── */
.empty-state { text-align:center; padding:40px; color:var(--hint); }
.empty-state .icon { font-size:36px; margin-bottom:12px; }
.divider { height:1px; background:var(--gray); margin:16px 0; }
.flex { display:flex; } .flex-1 { flex:1; } .gap-8 { gap:8px; } .gap-12 { gap:12px; } .gap-16 { gap:16px; } .gap-20 { gap:20px; }
.items-center { align-items:center; } .justify-between { justify-content:space-between; }
.mb-8 { margin-bottom:8px; } .mb-12 { margin-bottom:12px; } .mb-16 { margin-bottom:16px; } .mb-20 { margin-bottom:20px; }
.mt-8 { margin-top:8px; } .mt-12 { margin-top:12px; } .mt-16 { margin-top:16px; }
.text-sm { font-size:12px; } .text-xs { font-size:11px; } .text-sub { color:var(--sub); }

/* ═══════════ Section 1: Skill Creator ═══════════ */
.creator-layout { display:grid; grid-template-columns:3fr 2fr; gap:20px; padding:16px 24px; height:calc(100vh - 108px); }
.creator-layout > div { min-height:0; overflow:hidden; display:flex; flex-direction:column; }
@media(max-width:1200px) { .creator-layout { grid-template-columns:1fr; height:auto; } }

.pipeline { display:flex; gap:0; margin-bottom:16px; flex-shrink:0; }
.pipe-step { flex:1; display:flex; align-items:center; gap:6px; padding:10px 12px; background:var(--white); border:1px solid var(--gray); cursor:pointer; transition:all .2s; position:relative; font-size:12px; font-weight:600; }
.pipe-step:first-child { border-radius:var(--radius-sm) 0 0 var(--radius-sm); }
.pipe-step:last-child { border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.pipe-step .step-num { width:22px; height:22px; border-radius:50%; background:var(--gray-bg); color:var(--sub); display:flex; align-items:center; justify-content:center; font-size:10px; flex-shrink:0; }
.pipe-step.active { background:var(--primary-light); border-color:var(--primary); color:var(--primary); }
.pipe-step.active .step-num { background:var(--primary); color:#fff; }
.pipe-step.done { background:var(--green-light); border-color:var(--green); color:var(--green-dark); }
.pipe-step.done .step-num { background:var(--green); color:#fff; }
.pipe-step:hover:not(.active):not(.done) { border-color:var(--primary); }

.creator-tool-select { display:flex; gap:8px; margin-bottom:16px; }
.tool-chip { padding:6px 14px; border-radius:20px; font-size:11px; cursor:pointer; border:1.5px solid var(--gray); background:var(--white); transition:all .2s; font-weight:500; }
.tool-chip:hover { border-color:var(--purple); }
.tool-chip.active { background:var(--purple); color:#fff; border-color:var(--purple); }

.chat-area { flex:1; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.card.chat-area { display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.card.chat-area > .card-header { flex-shrink:0; }
.card.chat-area > div:last-child { flex-shrink:0; }
.chat-messages { flex:1; overflow-y:auto; padding:16px 4px; display:flex; flex-direction:column; gap:16px; min-height:0; }
.chat-msg { display:flex; gap:10px; max-width:88%; animation:chatFadeIn .3s ease; }
.chat-msg.user { align-self:flex-end; flex-direction:row-reverse; }
.chat-msg .avatar { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.chat-msg.user .avatar { background:var(--primary); color:#fff; }
.chat-msg.bot .avatar { background:linear-gradient(135deg,var(--primary),var(--purple)); color:#fff; }
@keyframes chatFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.chat-bubble { padding:12px 16px; border-radius:var(--radius); font-size:14px; line-height:1.7; max-width:100%; overflow-wrap:break-word; }
.chat-msg.user .chat-bubble { background:var(--primary-soft); color:var(--dark); border:1px solid rgba(37,99,235,0.18); border-bottom-right-radius:4px; }
.chat-msg.bot .chat-bubble { background:var(--white); border:1px solid var(--gray); box-shadow:var(--shadow); border-bottom-left-radius:4px; }
.chat-bubble[data-streaming="true"] { border-left:3px solid var(--green); }

/* Markdown inside bot chat bubbles */
.chat-bubble p { margin:0 0 10px; } .chat-bubble p:last-child { margin-bottom:0; }
.chat-bubble h1,.chat-bubble h2,.chat-bubble h3,.chat-bubble h4 { margin:14px 0 6px; font-weight:600; line-height:1.3; }
.chat-bubble h1:first-child,.chat-bubble h2:first-child,.chat-bubble h3:first-child { margin-top:0; }
.chat-bubble h1 { font-size:1.2em; } .chat-bubble h2 { font-size:1.1em; } .chat-bubble h3 { font-size:1em; }
.chat-bubble ul,.chat-bubble ol { margin:8px 0; padding-left:20px; }
.chat-bubble li { margin:3px 0; }
.chat-bubble code { font-family:var(--font-mono); font-size:0.85em; background:rgba(0,0,0,0.05); padding:1px 5px; border-radius:4px; }
.chat-bubble pre { margin:10px 0; border-radius:var(--radius-sm); overflow:hidden; border:1px solid var(--gray); }
.chat-bubble pre code { display:block; padding:12px 14px; background:#f6f8fa; font-size:12px; line-height:1.6; overflow-x:auto; }
.chat-bubble blockquote { margin:8px 0; padding:8px 14px; border-left:3px solid var(--primary); background:var(--primary-soft); border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.chat-bubble table { width:100%; border-collapse:collapse; margin:10px 0; font-size:12px; }
.chat-bubble th,.chat-bubble td { padding:6px 10px; border:1px solid var(--gray); text-align:left; }
.chat-bubble th { background:var(--gray-bg); font-weight:600; }
.chat-bubble a { color:var(--primary); text-decoration:none; } .chat-bubble a:hover { text-decoration:underline; }
.chat-bubble hr { border:none; border-top:1px solid var(--gray); margin:12px 0; }
.chat-bubble strong { font-weight:600; }
.chat-bubble em { font-style:italic; }

.chat-input-area { display:flex; gap:8px; padding-top:12px; border-top:1px solid var(--gray); flex-shrink:0; }
.chat-input-area input { flex:1; }

.preview-panel { background:var(--white); border:1px solid var(--gray); border-radius:var(--radius); display:flex; flex-direction:column; overflow:hidden; }
.preview-header { padding:14px 18px; border-bottom:1px solid var(--gray); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.preview-header h3 { font-size:14px; font-weight:600; }
.preview-body { flex:1; padding:16px 18px; overflow-y:auto; min-height:0; }
.code-block { background:#f6f8fa; color:var(--dark); padding:16px; border-radius:var(--radius-sm); font-family:var(--font-mono); font-size:12px; line-height:1.7; overflow-x:auto; white-space:pre-wrap; border:1px solid var(--gray); }
.code-block .ck { color:var(--primary); } .code-block .cs { color:var(--green); } .code-block .cn { color:var(--orange); } .code-block .cc { color:var(--hint); font-style:italic; }

/* ═══════════ Section 2: Tool Library & Skill Editor ═══════════ */
.tl-subview { display:none; } .tl-subview.active { display:block; }

.tl-topbar { display:flex; align-items:center; gap:16px; padding:16px 24px; background:var(--white); border-bottom:1px solid var(--gray); }
.tl-topbar h2 { font-size:18px; font-weight:700; display:flex; align-items:center; gap:8px; white-space:nowrap; }
.tl-search { flex:1; max-width:480px; padding:9px 16px 9px 36px; border:1.5px solid var(--gray); border-radius:24px; font-size:13px; outline:none; background:var(--gray-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca0ab' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 12px center no-repeat; transition:border .2s; }
.tl-search:focus { border-color:var(--primary); background-color:var(--white); }
.tl-selected-badge { background:var(--primary); color:#fff; padding:7px 18px; border-radius:20px; font-size:12px; font-weight:600; white-space:nowrap; }
.tl-body { display:grid; grid-template-columns:200px 1fr; min-height:calc(100vh - 118px); }
.tl-cats { background:var(--white); border-right:1px solid var(--gray); padding:16px 12px; overflow-y:auto; }
.tl-cats .cats-title { font-size:12px; font-weight:700; color:var(--sub); margin-bottom:10px; }
.tl-cat-item { display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:var(--radius-sm); cursor:pointer; transition:all .15s; font-size:13px; font-weight:500; margin-bottom:2px; }
.tl-cat-item:hover { background:var(--gray-bg); }
.tl-cat-item.active { background:var(--primary-light); color:var(--primary); font-weight:700; }
.tl-cat-item .ci-icon { font-size:15px; }
.tl-cat-item .ci-count { margin-left:auto; font-size:10px; font-weight:600; color:var(--hint); background:var(--gray-bg); padding:2px 8px; border-radius:10px; min-width:22px; text-align:center; }
.tl-cat-item.active .ci-count { background:var(--primary); color:#fff; }
.tl-cat-item.indent { padding-left:32px; font-size:12px; }
.tl-cat-group { display:flex; align-items:center; gap:6px; padding:10px 12px; border-radius:var(--radius-sm); cursor:pointer; transition:all .15s; font-size:13px; font-weight:700; color:var(--dark); margin-top:8px; margin-bottom:2px; user-select:none; }
.tl-cat-group:hover { background:var(--gray-bg); }
.tl-cat-group.active { background:var(--primary-light); color:var(--primary); }
.tl-cat-group .cg-arrow { font-size:14px; width:18px; text-align:center; flex-shrink:0; color:var(--dark); font-weight:700; transition:transform .2s; }
.tl-cat-group .ci-icon { font-size:15px; }
.tl-cat-group .ci-count { margin-left:auto; font-size:10px; font-weight:600; color:var(--hint); background:var(--gray-bg); padding:2px 8px; border-radius:10px; min-width:22px; text-align:center; }
.tl-cat-group.active .ci-count { background:var(--primary); color:#fff; }
.tl-main { padding:16px 20px; overflow-y:auto; }
.tl-filters { display:flex; gap:6px; margin-bottom:16px; align-items:center; flex-wrap:wrap; }
.sk-sep { width:1px; height:16px; background:var(--gray); margin:0 4px; flex-shrink:0; }
.sk-group-label { font-size:11px; font-weight:600; color:var(--hint); margin-right:2px; white-space:nowrap; user-select:none; }
.tl-filter { padding:5px 16px; border-radius:16px; font-size:12px; cursor:pointer; border:1px solid var(--gray); background:var(--white); color:var(--sub); transition:all .15s; font-weight:500; }
.tl-filter:hover { border-color:var(--primary); color:var(--primary); }
.tl-filter.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.tl-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; }
.tl-grid.sk-grid { grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); }
.tl-card { background:var(--white); border:1.5px solid var(--gray); border-radius:var(--radius); padding:16px; transition:all .2s; position:relative; cursor:pointer; display:flex; flex-direction:column; }
.tl-card:hover { border-color:var(--primary); box-shadow:var(--shadow-md); transform:translateY(-1px); }
.tl-card.selected { border-color:var(--primary); }
.tl-card .tc-check { position:absolute; top:10px; right:10px; width:22px; height:22px; border-radius:6px; border:2px solid var(--gray); display:flex; align-items:center; justify-content:center; font-size:11px; color:#fff; transition:all .15s; }
.tl-card.selected .tc-check { background:var(--primary); border-color:var(--primary); }
.tl-card .tc-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:10px; }
.tl-card .tc-name { font-size:14px; font-weight:700; margin-bottom:2px; }
.tl-card .tc-api { font-size:10px; color:var(--hint); font-family:var(--font-mono); margin-bottom:6px; }
.tl-card .tc-desc { font-size:11px; color:var(--sub); line-height:1.5; margin-bottom:12px; height:50px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.tl-card .tc-actions { display:flex; gap:6px; align-items:center; margin-top:auto; }
.tl-card .tc-actions .btn { font-size:11px; padding:4px 12px; }
.tl-footer { padding:12px 24px; text-align:center; font-size:12px; color:var(--hint); border-top:1px solid var(--gray); background:var(--white); }

/* -- Skill Editor (IDE two-panel) -- */
.se-topbar { display:flex; align-items:center; gap:12px; padding:10px 20px; background:var(--white); border-bottom:1px solid var(--gray); }
.se-topbar .se-brand { font-size:15px; font-weight:700; display:flex; align-items:center; gap:8px; }
.se-topbar .se-skill-name { color:var(--primary); font-size:13px; font-weight:600; }
.se-topbar .se-modified { font-size:11px; color:var(--orange); font-weight:600; }
.se-topbar .se-actions { margin-left:auto; display:flex; gap:6px; align-items:center; }

.se-more-wrap { position:relative; }
.se-more-menu { position:absolute; top:100%; right:0; margin-top:4px; background:var(--white); border:1px solid var(--gray); border-radius:var(--radius-sm); box-shadow:var(--shadow-md); z-index:100; min-width:180px; padding:4px 0; }
.se-more-item { padding:8px 16px; font-size:13px; cursor:pointer; transition:background .1s; }
.se-more-item:hover { background:var(--gray-bg); }

.se-layout { display:grid; grid-template-columns:220px 1fr; min-height:calc(100vh - 118px); }
@media(max-width:1100px) { .se-layout { grid-template-columns:180px 1fr; } }

/* File Tree */
.se-filetree { background:var(--white); border-right:1px solid var(--gray); display:flex; flex-direction:column; overflow:hidden; }
.sft-header { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border-bottom:1px solid var(--gray); }
.sft-title { font-size:12px; font-weight:700; color:var(--sub); text-transform:uppercase; letter-spacing:.5px; }
.sft-actions { display:flex; gap:4px; }
.sft-tree { flex:1; overflow-y:auto; padding:6px 0; user-select:none; }

.sft-dir { margin-bottom:2px; }
.sft-dir-label { display:flex; align-items:center; gap:4px; padding:4px 8px 4px 0; cursor:pointer; font-size:12px; font-weight:600; color:var(--sub); border-radius:4px; transition:background .1s; }
.sft-dir-label:hover { background:var(--gray-bg); }
.sft-dir-label .sft-arrow { display:inline-block; width:16px; text-align:center; font-size:10px; transition:transform .15s; flex-shrink:0; }
.sft-dir-label .sft-arrow.open { transform:rotate(90deg); }
.sft-dir-children { padding-left:12px; }
.sft-dir-children.collapsed { display:none; }

.sft-file { display:flex; align-items:center; gap:6px; padding:4px 8px 4px 20px; cursor:pointer; font-size:13px; color:var(--text); border-radius:4px; transition:background .1s; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sft-file:hover { background:var(--gray-bg); }
.sft-file.active { background:var(--primary-light); color:var(--primary-dark); font-weight:600; }
.sft-file .sft-icon { font-size:14px; flex-shrink:0; }

/* Main Editor Area */
.se-main-editor { display:flex; flex-direction:column; background:var(--bg); overflow:hidden; }
.se-editor-header { display:flex; align-items:center; justify-content:space-between; padding:8px 16px; background:var(--white); border-bottom:1px solid var(--gray); min-height:40px; }
.se-current-file { font-size:13px; font-weight:600; color:var(--sub); font-family:var(--font-mono); display:flex; align-items:center; gap:6px; }
.se-file-actions { display:flex; gap:6px; }

.se-editor-content { flex:1; display:flex; overflow:hidden; }
.se-editor-content.has-preview { }
.se-code-pane { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.se-code-pane .CodeMirror { flex:1; height:auto; font-size:13px; line-height:1.7; }
.se-textarea { width:100%; flex:1; padding:16px; border:none; outline:none; font-size:13px; font-family:var(--font-mono); line-height:1.7; resize:none; background:var(--white); display:none; }

.se-preview-pane { width:50%; border-left:1px solid var(--gray); display:none; flex-direction:column; overflow:hidden; background:var(--white); }
.se-preview-pane.visible { display:flex; }
.se-preview-pane .se-preview-label { padding:6px 14px; font-size:10px; font-weight:700; color:var(--sub); background:var(--gray-bg); border-bottom:1px solid var(--gray); text-transform:uppercase; letter-spacing:.5px; }
.se-preview-md { padding:16px 20px; font-size:13px; line-height:1.8; flex:1; overflow-y:auto; }
.se-preview-md h1 { font-size:18px; margin:16px 0 8px; }
.se-preview-md h2 { font-size:15px; margin:14px 0 6px; color:var(--primary); }
.se-preview-md h3 { font-size:13px; margin:10px 0 4px; }
.se-preview-md ul,.se-preview-md ol { padding-left:20px; margin:6px 0; }
.se-preview-md li { margin:3px 0; }
.se-preview-md code { background:var(--gray-bg); padding:1px 6px; border-radius:3px; font-size:12px; }
.se-preview-md pre { background:#f6f8fa; color:var(--dark); padding:12px; border-radius:var(--radius-sm); font-size:12px; line-height:1.6; overflow-x:auto; margin:8px 0; border:1px solid var(--gray); }
.se-preview-md hr { border:none; border-top:1px solid var(--gray); margin:12px 0; }

/* Context Menu */
.se-context-menu { position:fixed; display:none; background:var(--white); border:1px solid var(--gray); border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); z-index:200; min-width:160px; padding:4px 0; }
.se-ctx-item { padding:7px 14px; font-size:13px; cursor:pointer; transition:background .1s; display:flex; align-items:center; gap:8px; }
.se-ctx-item:hover { background:var(--gray-bg); }
.se-ctx-divider { height:1px; background:var(--gray); margin:4px 0; }

/* ═══════════ Section 3: Eval Center ═══════════ */
.sub-header { background:var(--white); border-bottom:1px solid var(--gray); padding:12px 24px; display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.skill-select { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--sub); }
.skill-select select { padding:6px 12px; border:1px solid var(--gray); border-radius:var(--radius-sm); font-size:13px; outline:none; background:var(--white); }
.version-pills { display:flex; gap:4px; }
.ver-pill { padding:4px 12px; border-radius:14px; font-size:11px; cursor:pointer; border:1px solid var(--gray); color:var(--sub); background:var(--white); transition:all .2s; }
.ver-pill.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.ver-pill:hover:not(.active) { border-color:var(--primary); color:var(--primary); }
.stat-chips { display:flex; gap:8px; margin-left:auto; }
.stat-chip { display:flex; align-items:center; gap:4px; padding:4px 10px; border-radius:14px; font-size:11px; background:var(--gray-bg); color:var(--sub); }
.stat-chip strong { color:var(--text); }

.sub-tabs { display:flex; background:var(--white); border-bottom:1px solid var(--gray); padding:0 24px; }
.sub-tab { padding:12px 20px; font-size:13px; color:var(--sub); cursor:pointer; border-bottom:2px solid transparent; transition:all .2s; display:flex; align-items:center; gap:6px; }
.sub-tab:hover { color:var(--primary); }
.sub-tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.sub-tab .badge { background:var(--primary-light); color:var(--primary); padding:1px 7px; border-radius:10px; font-size:10px; font-weight:600; }

.eval-content { padding:20px 24px; }
.tab-pane { display:none; }
.tab-pane.active { display:block; }
#se-files.active { display:flex; flex-direction:column; }

.eval-name { font-weight:600; color:var(--text); }
.eval-prompt { color:var(--sub); max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.expect-count { background:var(--gray-bg); padding:2px 8px; border-radius:10px; font-size:11px; color:var(--sub); }
.row-actions { display:flex; gap:4px; }

.create-layout { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media(max-width:1200px) { .create-layout { grid-template-columns:1fr; } }
.expectations-list { display:flex; flex-direction:column; gap:6px; }
.expect-row { display:flex; gap:8px; align-items:center; }
.expect-row input { flex:1; }
.expect-row .remove-btn { width:28px; height:28px; border-radius:50%; border:none; background:var(--red-light); color:var(--red); cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.json-preview { background:#f6f8fa; color:var(--dark); padding:16px; border-radius:var(--radius-sm); font-family:var(--font-mono); font-size:12px; line-height:1.6; max-height:300px; overflow:auto; white-space:pre-wrap; border:1px solid var(--gray); }
.json-key { color:var(--primary); } .json-str { color:var(--green); } .json-num { color:var(--orange); }

.gen-mode { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.gen-mode-option { display:flex; align-items:center; gap:10px; padding:10px 14px; border:1.5px solid var(--gray); border-radius:var(--radius-sm); cursor:pointer; transition:all .2s; }
.gen-mode-option:hover { border-color:var(--purple); }
.gen-mode-option.active { border-color:var(--purple); background:var(--purple-light); }
.gen-mode-option .icon { font-size:18px; } .gen-mode-option .info { flex:1; }
.gen-mode-option .info .title { font-size:12px; font-weight:600; color:var(--text); }
.gen-mode-option .info .desc { font-size:10px; color:var(--sub); margin-top:2px; }
.gen-mode-option .radio { width:16px; height:16px; border-radius:50%; border:2px solid var(--gray); }
.gen-mode-option.active .radio { border-color:var(--purple); background:var(--purple); box-shadow:inset 0 0 0 3px #fff; }

.gen-result-item { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px solid var(--gray); border-radius:var(--radius-sm); margin-bottom:8px; transition:all .2s; }
.gen-result-item:hover { border-color:var(--purple); }
.gen-result-item.checked { border-color:var(--purple); background:var(--purple-light); }
.gen-checkbox { width:18px; height:18px; border-radius:4px; border:2px solid var(--gray); cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; font-size:10px; transition:all .2s; }
.gen-checkbox.checked { background:var(--purple); border-color:var(--purple); color:#fff; }

.test-layout { display:grid; grid-template-columns:340px 1fr; gap:20px; }
@media(max-width:1100px) { .test-layout { grid-template-columns:1fr; } }
.test-mode-option { display:flex; align-items:center; gap:8px; padding:8px 12px; border:1.5px solid var(--gray); border-radius:var(--radius-sm); cursor:pointer; margin-bottom:6px; transition:all .2s; font-size:12px; }
.test-mode-option:hover { border-color:var(--primary); }
.test-mode-option.active { border-color:var(--primary); background:var(--primary-light); }
.score-card { text-align:center; padding:16px; border-radius:var(--radius); border:1.5px solid var(--gray); flex:1; }
.score-card .score { font-size:28px; font-weight:700; }
.score-card .label { font-size:11px; color:var(--sub); margin-top:4px; }
.score-card.new-s { border-color:#a7f3d0; } .score-card.new-s .score { color:var(--green); }
.score-card.old-s { border-color:#fde68a; } .score-card.old-s .score { color:var(--orange); }
.score-card.without-s { border-color:#fca5a5; } .score-card.without-s .score { color:var(--red); }

.progress-bar-bg { width:100%; height:8px; background:var(--gray); border-radius:4px; overflow:hidden; }
.progress-bar-fill { height:100%; border-radius:4px; transition:width .5s ease; }
.progress-bar-fill.green { background:var(--green); } .progress-bar-fill.blue { background:var(--primary); }

.test-item-row { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--gray); font-size:12px; }
.test-status { width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:10px; flex-shrink:0; }
.test-status.done { background:var(--green-light); color:var(--green); }
.test-status.running { background:var(--primary-light); color:var(--primary); animation:cfgPulse 1s infinite; }
.test-status.queued { background:var(--gray-bg); color:var(--hint); }
@keyframes cfgPulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.disc-tag { padding:2px 8px; border-radius:10px; font-size:9px; font-weight:600; }
.disc-tag.high { background:var(--red-light); color:var(--red-dark); }
.disc-tag.medium { background:var(--orange-light); color:var(--orange-dark); }
.disc-tag.low { background:var(--primary-light); color:var(--primary); }
.disc-tag.none { background:var(--gray-bg); color:var(--hint); }

.model-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:16px; }
.model-card { border:1.5px solid var(--gray); border-radius:var(--radius); padding:18px; transition:all .2s; cursor:pointer; background:var(--white); }
.model-card:hover { border-color:var(--primary); box-shadow:var(--shadow-md); }
.model-card.selected { border-color:var(--primary); background:var(--primary-light); }
.model-card-header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.model-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; }
.model-name { font-size:14px; font-weight:600; }
.model-version { font-size:11px; color:var(--sub); }
.model-tags { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:10px; }
.model-tag { padding:2px 8px; border-radius:10px; font-size:9px; font-weight:600; }

/* ═══════════ Section 4: Publishing ═══════════ */
.publish-content { padding:20px 24px; }

.publish-pipeline { display:flex; align-items:center; gap:0; margin-bottom:24px; background:var(--white); border:1px solid var(--gray); border-radius:var(--radius); padding:20px 24px; }
.pipe-node { flex:1; text-align:center; position:relative; }
.pipe-node-inner { display:inline-flex; flex-direction:column; align-items:center; gap:6px; padding:12px 16px; border-radius:var(--radius); border:2px solid var(--gray); background:var(--white); transition:all .2s; cursor:pointer; min-width:120px; }
.pipe-node-inner:hover { border-color:var(--primary); box-shadow:var(--shadow-md); }
.pipe-node-inner.active { border-color:var(--green); background:var(--green-light); }
.pipe-node-inner .node-icon { font-size:24px; }
.pipe-node-inner .node-label { font-size:11px; font-weight:600; }
.pipe-node-inner .node-status { font-size:9px; color:var(--sub); }
.pipe-arrow { width:40px; display:flex; align-items:center; justify-content:center; color:var(--hint); font-size:18px; flex-shrink:0; }

.device-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:16px; margin-bottom:24px; }
.device-card { border:1.5px solid var(--gray); border-radius:var(--radius); padding:18px; background:var(--white); transition:all .2s; }
.device-card:hover { border-color:var(--primary); box-shadow:var(--shadow-md); }
.device-card .dev-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.device-card .dev-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; }
.device-card .dev-name { font-size:14px; font-weight:600; }
.device-card .dev-status { font-size:11px; display:flex; align-items:center; gap:4px; }
.device-card .dev-status .dot { width:7px; height:7px; border-radius:50%; }
.device-card .dev-status .dot.on { background:var(--green); }
.device-card .dev-status .dot.off { background:var(--hint); }
.device-card .dev-info { font-size:11px; color:var(--sub); margin-bottom:12px; }
.device-card .dev-info div { padding:3px 0; display:flex; justify-content:space-between; }

.timeline { position:relative; padding-left:24px; }
.timeline::before { content:''; position:absolute; left:8px; top:0; bottom:0; width:2px; background:var(--gray); }
.timeline-item { position:relative; margin-bottom:16px; padding-left:16px; }
.timeline-item::before { content:''; position:absolute; left:-20px; top:6px; width:12px; height:12px; border-radius:50%; border:2px solid var(--gray); background:var(--white); }
.timeline-item.success::before { border-color:var(--green); background:var(--green-light); }
.timeline-item.fail::before { border-color:var(--red); background:var(--red-light); }
.timeline-item.rollback::before { border-color:var(--orange); background:var(--orange-light); }
.timeline-item .tl-time { font-size:10px; color:var(--hint); }
.timeline-item .tl-title { font-size:13px; font-weight:600; margin:2px 0; }
.timeline-item .tl-desc { font-size:11px; color:var(--sub); }

.sync-table { width:100%; border-collapse:collapse; }
.sync-table th { text-align:left; padding:10px 14px; font-size:11px; color:var(--sub); font-weight:600; text-transform:uppercase; letter-spacing:.5px; background:var(--gray-bg); border-bottom:1px solid var(--gray); }
.sync-table td { padding:10px 14px; border-bottom:1px solid var(--gray); font-size:12px; }
.sync-table tr:hover td { background:#f8faff; }
.sync-badge { padding:2px 10px; border-radius:10px; font-size:10px; font-weight:600; }
.sync-badge.synced { background:var(--green-light); color:var(--green-dark); }
.sync-badge.outdated { background:var(--orange-light); color:var(--orange-dark); }
.sync-badge.missing { background:var(--red-light); color:var(--red-dark); }

/* Detail Panel */
.detail-panel { position:fixed; right:-480px; top:60px; width:480px; height:calc(100vh - 60px);
  background:var(--white); border-left:1px solid var(--gray); box-shadow:-4px 0 20px rgba(0,0,0,0.08);
  z-index:50; transition:right .3s ease; overflow-y:auto; }
.detail-panel.open { right:0; }
.detail-close { position:absolute; top:12px; right:12px; cursor:pointer; font-size:18px; color:var(--sub);
  width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  transition:all .2s; border:none; background:var(--gray-bg); }
.detail-close:hover { background:var(--red-light); color:var(--red); }
.detail-header { padding:20px; border-bottom:1px solid var(--gray); }
.detail-header h2 { font-size:16px; margin-bottom:6px; }
.detail-section { padding:16px 20px; border-bottom:1px solid var(--gray); }
.detail-section h4 { font-size:12px; color:var(--sub); font-weight:600; margin-bottom:8px; text-transform:uppercase; letter-spacing:.5px; }
.detail-prompt { background:var(--gray-bg); padding:12px; border-radius:var(--radius-sm); font-size:13px; line-height:1.6; }
.expect-item { display:flex; align-items:flex-start; gap:8px; padding:8px 0; border-bottom:1px solid var(--gray); }
.expect-item:last-child { border-bottom:none; }
.expect-num { width:22px; height:22px; border-radius:50%; background:var(--primary-light); color:var(--primary); font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.expect-text { font-size:12px; color:var(--text); line-height:1.5; }

/* ═══════════ Skill List Cards ═══════════ */
.sk-card { background:var(--white); border:1.5px solid var(--gray); border-radius:var(--radius); padding:18px; transition:all .2s; cursor:pointer; position:relative; display:flex; flex-direction:column; }
.sk-card:hover { border-color:var(--primary); box-shadow:var(--shadow-md); transform:translateY(-1px); }
.sk-card .sk-header { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.sk-card .sk-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; }
.sk-card .sk-name { font-size:14px; font-weight:700; }
.sk-card .sk-id { font-size:10px; color:var(--hint); font-family:var(--font-mono); }
.sk-card .sk-desc { font-size:11px; color:var(--sub); line-height:1.5; margin-bottom:10px; height:50px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.sk-card .sk-meta { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; height:24px; overflow:hidden; }
.sk-card .sk-meta .sm-tag { padding:2px 8px; border-radius:10px; font-size:9px; font-weight:600; }
.sk-card .sk-actions { display:flex; gap:6px; border-top:1px solid var(--gray); padding-top:10px; margin-top:auto; }
.sk-card .sk-actions .btn { font-size:11px; }

.sk-card.disabled { opacity:0.5; border-color:var(--hint); }
.sk-card.disabled::after { content:'已禁用'; position:absolute; top:8px; right:8px; background:#ef4444; color:#fff; font-size:9px; font-weight:700; padding:2px 8px; border-radius:8px; }
.sk-card.disabled:hover { opacity:0.7; }
.btn-success { background:#10b981; color:#fff; border:none; }
.btn-success:hover { background:#059669; }
.btn-warn { background:#f59e0b; color:#fff; border:none; }
.btn-warn:hover { background:#d97706; }

/* ═══════════ Tool Picker Modal ═══════════ */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; display:none; align-items:center; justify-content:center; }
.modal-overlay.open { display:flex; }
#skills-page .modal-box { background:var(--white); border-radius:12px; width:90vw; max-width:1100px; max-height:85vh; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.2); }
.modal-header { padding:16px 24px; border-bottom:1px solid var(--gray); display:flex; align-items:center; gap:16px; }
.modal-header h3 { font-size:16px; font-weight:700; white-space:nowrap; }
.modal-close { margin-left:auto; width:32px; height:32px; border-radius:50%; border:none; background:var(--gray-bg); cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.modal-close:hover { background:var(--red-light); color:var(--red); }
.modal-body-inner { display:grid; grid-template-columns:180px 1fr; flex:1; overflow:hidden; }
.modal-cats { border-right:1px solid var(--gray); padding:12px; overflow-y:auto; }
.modal-grid-area { padding:14px; overflow-y:auto; }
.modal-footer { padding:12px 24px; border-top:1px solid var(--gray); display:flex; align-items:center; justify-content:space-between; }

/* ═══════════ (Skill File Manager - replaced by se-filetree) ═══════════ */

/* ═══════════ Creator Tool Picker Phase ═══════════ */
.creator-subview { display:none; } .creator-subview.active { display:block; }
.ctp-topbar { display:flex; align-items:center; gap:14px; padding:12px 24px; background:var(--white); border-bottom:1px solid var(--gray); }
.ctp-topbar h2 { font-size:15px; font-weight:700; white-space:nowrap; }
.ctp-topbar .ctp-selected-badge { background:var(--primary); color:#fff; padding:4px 14px; border-radius:16px; font-size:12px; font-weight:600; white-space:nowrap; cursor:default; }
.ctp-chip { padding:4px 12px; border-radius:14px; font-size:11px; background:var(--primary-light); color:var(--primary); font-weight:600; display:inline-flex; align-items:center; gap:4px; }
.ctp-chip .chip-remove { cursor:pointer; font-size:8px; background:var(--primary); color:#fff; width:14px; height:14px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; }

/* ═══════════ Section 5: Prompts ═══════════ */
.prompts-layout { display:grid; grid-template-columns:240px 1fr; min-height:calc(100vh - 76px); }
.prompts-sidebar { background:var(--white); border-right:1px solid var(--gray); padding:16px 12px; overflow-y:auto; }
.prompts-sidebar .ps-title { font-size:12px; font-weight:700; color:var(--sub); margin-bottom:12px; text-transform:uppercase; letter-spacing:.5px; }
.prompt-item { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border-radius:var(--radius-sm); cursor:pointer; transition:all .15s; margin-bottom:4px; }
.prompt-item:hover { background:var(--gray-bg); }
.prompt-item.active { background:var(--primary-light); color:var(--primary); }
.prompt-item .pi-name { font-size:13px; font-weight:600; }
.prompt-item .pi-badge { font-size:9px; padding:2px 8px; border-radius:10px; font-weight:600; }
.prompt-item .pi-badge.custom { background:rgba(59,130,246,.1); color:var(--primary); }
.prompt-item .pi-badge.default { background:var(--gray-bg); color:var(--hint); }
.prompts-main { display:flex; flex-direction:column; background:var(--bg); }
.prompts-toolbar { padding:12px 20px; background:var(--white); border-bottom:1px solid var(--gray); display:flex; align-items:center; justify-content:space-between; }
.prompts-toolbar .pt-name { font-size:15px; font-weight:700; display:flex; align-items:center; gap:8px; }
.prompts-editor-area { display:grid; grid-template-columns:1fr 1fr; flex:1; overflow:hidden; }
.prompts-edit-pane { display:flex; flex-direction:column; border-right:1px solid var(--gray); }
.prompts-edit-pane .pane-label { padding:8px 16px; font-size:11px; font-weight:600; color:var(--sub); background:var(--gray-bg); border-bottom:1px solid var(--gray); text-transform:uppercase; letter-spacing:.5px; }
.prompts-edit-pane textarea { flex:1; padding:16px; border:none; outline:none; font-size:13px; font-family:var(--font-mono); line-height:1.7; resize:none; background:var(--white); }
.prompts-preview-pane { display:flex; flex-direction:column; overflow-y:auto; }
.prompts-preview-pane .pane-label { padding:8px 16px; font-size:11px; font-weight:600; color:var(--sub); background:var(--gray-bg); border-bottom:1px solid var(--gray); text-transform:uppercase; letter-spacing:.5px; }
.prompts-preview-pane .preview-content { flex:1; padding:16px 20px; font-size:13px; line-height:1.8; overflow-y:auto; }
.prompts-placeholder { flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; color:var(--hint); }
.prompts-placeholder .icon { font-size:48px; margin-bottom:16px; }

/* ═══════════ Section 6: Providers ═══════════ */
.providers-content { padding:20px 24px; max-width:900px; margin:0 auto; }
.providers-topbar { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.provider-card { background:var(--white); border:1.5px solid var(--gray); border-radius:var(--radius); padding:18px; margin-bottom:14px; transition:all .2s; }
.provider-card:hover { border-color:var(--primary); box-shadow:var(--shadow-md); }
.provider-card.editing { border-color:var(--primary); box-shadow:0 0 0 3px rgba(59,130,246,.15); }
.provider-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.provider-name { font-size:15px; font-weight:700; display:flex; align-items:center; gap:8px; }
.provider-name .pn-icon { width:32px; height:32px; border-radius:8px; background:linear-gradient(135deg,var(--primary),var(--purple)); display:flex; align-items:center; justify-content:center; color:#fff; font-size:14px; }
.provider-field { display:flex; align-items:center; gap:10px; margin:8px 0; font-size:13px; }
.provider-field label { min-width:80px; color:var(--sub); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.5px; flex-shrink:0; }
.provider-field .pf-value { color:var(--text); word-break:break-all; }
.provider-field .pf-masked { color:var(--hint); font-family:var(--font-mono); font-size:12px; }
.provider-empty { text-align:center; padding:60px 20px; color:var(--hint); }
.provider-empty .icon { font-size:48px; margin-bottom:16px; }

/* ═══════════ (Skill Editor Textarea - replaced by CodeMirror) ═══════════ */

/* Toast */
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px); background:var(--dark);
  color:#fff; padding:10px 24px; border-radius:20px; font-size:13px; z-index:999; opacity:0; transition:all .3s ease; }
.toast.show { transform:translateX(-50%) translateY(0); opacity:1; }

/* ═══════════ Global Hover & Transition Enhancements ═══════════ */
.sk-card, .tl-card, .model-card, .device-card, .provider-card {
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.sk-card:hover, .tl-card:hover, .model-card:hover, .device-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn { transition: all .15s ease; }
.btn:active { transform: scale(0.97); }

/* Chat streaming indicator */
@keyframes cfgStreamDot { 0%,80%,100% { opacity:.3; } 40% { opacity:1; } }
.streaming-dots { display:inline-flex; gap:3px; margin-left:4px; vertical-align:middle; }
.streaming-dots span { width:5px; height:5px; border-radius:50%; background:var(--primary); animation:cfgStreamDot 1.2s infinite; }
.streaming-dots span:nth-child(2) { animation-delay:.2s; }
.streaming-dots span:nth-child(3) { animation-delay:.4s; }

/* Scrollbar */
.chat-messages::-webkit-scrollbar, .preview-body::-webkit-scrollbar { width:5px; }
.chat-messages::-webkit-scrollbar-thumb, .preview-body::-webkit-scrollbar-thumb { background:var(--gray); border-radius:3px; }
.chat-messages::-webkit-scrollbar-track, .preview-body::-webkit-scrollbar-track { background:transparent; }
