/* Chanh extension mockup — VS Code dark theme */
:root {
  --bg-title: #2b2b2b;
  --bg-activity: #333333;
  --bg-sidebar: #252526;
  --bg-editor: #1e1e1e;
  --bg-tab: #2d2d2d;
  --bg-input: #313131;
  --bg-hover: #2a2d2e;
  --bg-selected: #37373d;
  --bg-popup: #252526;
  --fg: #cccccc;
  --fg-dim: #9d9d9d;
  --fg-faint: #717171;
  --fg-bright: #ffffff;
  --border: #3c3c3c;
  --border-soft: #2f2f2f;
  --accent: #0078d4;
  --accent-bright: #3794ff;
  --accent-soft: rgba(55, 148, 255, 0.14);
  --green: #89d185;
  --yellow: #e2c08d;
  --gold: #f6c33c;
  --red: #f14c4c;
  --busy: #cca700;
  --row-h: 22px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--fg);
  background: var(--bg-editor);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--accent-bright);
  outline-offset: 1px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #424242; border: 2px solid transparent; background-clip: padding-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #4f4f4f; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

.app {
  height: 100vh;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr) 22px;
}

/* ---------- Title bar ---------- */
.titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-title);
  border-bottom: 1px solid #1f1f1f;
  user-select: none;
  z-index: 20;
}

.titlebar-left { display: flex; align-items: center; min-width: 0; height: 100%; }
.menus { display: flex; height: 100%; padding-left: 10px; }
.menus button {
  padding: 0 8px;
  height: 100%;
  color: #cccccc;
  font-size: 12px;
  border-radius: 3px;
}
.menus button:hover { background: rgba(255, 255, 255, 0.1); }

.titlebar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #9d9d9d;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
}

.titlebar-right { display: flex; align-items: center; height: 100%; }

.demo-button {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  height: 22px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #1b1b1b;
  background: linear-gradient(180deg, #ffd86b, var(--gold));
  border: 1px solid #d9a92c;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.demo-button .icon { width: 12px; height: 12px; }
.demo-button:hover { filter: brightness(1.08); }
.demo-button:active { transform: translateY(1px); }

.window-controls { display: flex; height: 100%; }
.window-controls span {
  width: 46px;
  display: grid;
  place-items: center;
  color: #bdbdbd;
  font-size: 12px;
}
.window-controls span:hover { background: rgba(255, 255, 255, 0.1); }
.window-controls .close:hover { background: #c42b1c; color: #fff; }
.window-controls .max { font-size: 10px; }

/* ---------- Main ---------- */
.main {
  display: grid;
  grid-template-columns: 48px 312px minmax(0, 1fr);
  min-height: 0;
}

/* ---------- Activity bar ---------- */
.activitybar {
  background: var(--bg-activity);
  border-right: 1px solid #252525;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 4px;
  z-index: 10;
}

.activity {
  position: relative;
  height: 48px;
  display: grid;
  place-items: center;
  color: #8c8c8c;
  border-left: 2px solid transparent;
}
.activity .icon { width: 23px; height: 23px; stroke-width: 1.5; }
.activity:hover { color: #e7e7e7; }
.activity.active { color: #ffffff; border-left-color: var(--accent); }
.activity-logo { width: 27px; height: 27px; }
.activity.active .activity-logo { filter: drop-shadow(0 0 6px rgba(246, 195, 60, 0.45)); }
.activity-spacer { flex: 1; }

.badge {
  position: absolute;
  right: 7px;
  bottom: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.view-titlebar {
  height: 35px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 6px 0 20px;
  gap: 4px;
}
.view-title {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: #d4d4d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.view-actions { display: flex; align-items: center; }
.icon-button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #bdbdbd;
  border-radius: 4px;
}
.icon-button .icon { width: 16px; height: 16px; }
.icon-button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.icon-button.spinning .icon { animation: spin 0.8s linear infinite; }

.tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 0 12px;
  user-select: none;
}

.tree-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--row-h);
  padding-right: 6px;
  color: var(--fg);
  white-space: nowrap;
  cursor: pointer;
  font-size: 13px;
}
.tree-row:hover { background: var(--bg-hover); }
.tree-row.selected { background: var(--bg-selected); }
.tree-row.selected .label { color: #fff; }
.tree-row.group { font-weight: 400; }
.tree-row.header { font-weight: 600; color: #e2e2e2; }
.tree-row .chevron { width: 16px; height: 16px; flex: none; color: #bdbdbd; display: grid; place-items: center; }
.tree-row .chevron .icon { width: 15px; height: 15px; stroke-width: 1.8; }
.tree-row .chevron.empty { visibility: hidden; }
.tree-row .label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tree-row .label.green { color: var(--green); }
.tree-row .label.gold { color: var(--gold); }
.tree-row .desc {
  margin-left: auto;
  padding-left: 8px;
  color: var(--fg-dim);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  flex: none;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-row .desc.muted { color: var(--fg-faint); }
.tree-row .desc.accent { color: var(--accent-bright); }
.tree-row .row-icon {
  width: 16px; height: 16px; flex: none;
  /* Stroke-style sprite paths need these: without them SVG defaults to
     fill=black + stroke=none, which renders stroke icons invisible on the
     dark workbench (same rules as .icon above). Inline fill:currentColor
     on play/stop/circle-fill still wins via the style attribute. */
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; display: block;
}
.tree-row .row-icon.cap { opacity: 0.95; }
.tree-row .row-icon.loaded { color: var(--green); }
.tree-row .row-icon.idle { color: #8f8f8f; }
.tree-row .row-icon.hot { color: var(--gold); }
.tree-row .row-icon.warn { color: var(--yellow); }
.tree-row .row-icon.spin { color: var(--accent-bright); animation: spin 1s linear infinite; }

.row-actions {
  position: absolute;
  right: 4px;
  top: 0;
  height: 100%;
  display: none;
  align-items: center;
  gap: 1px;
  padding-left: 14px;
  background: linear-gradient(90deg, transparent, var(--bg-hover) 26%);
}
.tree-row:hover .row-actions { display: flex; }
.tree-row:hover .desc { visibility: hidden; }
.tree-row.selected .row-actions { background: linear-gradient(90deg, transparent, var(--bg-selected) 26%); }
.row-action {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  color: #c8c8c8;
  border-radius: 3px;
}
.row-action .icon { width: 14.5px; height: 14.5px; }
.row-action:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.mini-meter {
  width: 42px;
  height: 4px;
  flex: none;
  border-radius: 2px;
  background: #3d3d3d;
  overflow: hidden;
  margin-left: 2px;
}
.mini-meter i { display: block; height: 100%; border-radius: 2px; background: var(--green); transition: width 0.6s ease; }
.mini-meter.gpu i { background: var(--accent-bright); }
.mini-meter.ram i { background: var(--gold); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Editor ---------- */
.editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-editor);
}

.tabbar {
  height: 35px;
  flex: none;
  display: flex;
  align-items: stretch;
  background: #252526;
  border-bottom: 1px solid #1b1b1b;
  overflow-x: auto;
  overflow-y: hidden;
}
.tabbar::-webkit-scrollbar { height: 0; }

.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  min-width: 0;
  max-width: 260px;
  background: #2d2d2d;
  border-right: 1px solid #252526;
  color: #9d9d9d;
  font-size: 12.5px;
  white-space: nowrap;
}
.tab:hover { background: #333333; color: #d4d4d4; }
.tab.active { background: var(--bg-editor); color: #ffffff; }
.tab.active::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--accent);
}
.tab .tab-icon { width: 15px; height: 15px; flex: none; display: grid; place-items: center; color: #8fb7e8; }
.tab .tab-icon .icon { width: 14px; height: 14px; }
.tab .tab-label { overflow: hidden; text-overflow: ellipsis; }
.tab .tab-close {
  width: 18px; height: 18px;
  margin-left: 4px;
  display: grid; place-items: center;
  border-radius: 3px;
  color: #bbb;
  opacity: 0;
}
.tab:hover .tab-close, .tab.active .tab-close { opacity: 1; }
.tab .tab-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.tab .dirty { font-size: 9px; margin-left: 2px; color: #c8c8c8; }

.tabbar-fill { flex: 1; min-width: 24px; background: #252526; }
.tabbar-actions { display: flex; align-items: center; padding: 0 8px; background: #252526; gap: 2px; }
.tabbar-actions .icon-button { width: 24px; height: 24px; }

.editor-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.view { display: none; height: 100%; overflow: auto; }
.view.active { display: block; }

.empty-editor {
  display: none;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--fg-dim);
  text-align: center;
  padding: 30px;
}
.empty-editor.active { display: flex; }
.empty-logo { width: 78px; height: 78px; margin-bottom: 4px; opacity: 0.95; }
.empty-editor h2 { margin: 0; font-size: 25px; font-weight: 300; color: #e8e8e8; letter-spacing: 0.5px; }
.empty-editor h2 span { font-size: 20px; }
.empty-editor p { margin: 2px 0 18px; }
.empty-hints { display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
kbd {
  display: inline-block;
  min-width: 17px;
  padding: 1px 4px;
  margin: 0 1px;
  border: 1px solid #555;
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #333;
  color: #ddd;
  font-size: 10.5px;
  font-family: var(--font);
}

/* ---------- Status bar ---------- */
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 22px;
  padding: 0 4px;
  background: #007acc;
  color: #ffffff;
  font-size: 11.5px;
  overflow: hidden;
  user-select: none;
  z-index: 40;
}
.status-left, .status-right { display: flex; align-items: center; height: 100%; min-width: 0; }
.status-right { justify-content: flex-end; }
.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 7px;
  color: #ffffff;
  font-size: 11.5px;
  white-space: nowrap;
}
.status-item:hover { background: rgba(255, 255, 255, 0.16); }
.status-item .icon { width: 13px; height: 13px; }
.status-remote { background: rgba(0, 0, 0, 0.14); padding-left: 8px; }
.status-url { opacity: 0.75; font-size: 10.5px; }
.status-warning { opacity: 0.9; }
.bell { font-size: 11px; filter: grayscale(1) brightness(2.2); }
@media (max-width: 1180px) {
  .status-right .status-item:nth-child(2),
  .status-right .status-item:nth-child(4),
  .status-right .status-item:nth-child(6) { display: none; }
}

/* ---------- Model info ---------- */
.info-page {
  padding: 26px 30px 40px;
  max-width: 1180px;
  margin: 0 auto;
}
.info-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 9px;
}
.info-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(137, 209, 133, 0.7); }
.info-title-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.info-title-row h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 600;
  color: #f0f0f0;
  letter-spacing: -0.3px;
  word-break: break-word;
}
.info-badge {
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--green);
  background: rgba(137, 209, 133, 0.12);
  border: 1px solid rgba(137, 209, 133, 0.35);
}
.info-badge.offline { color: var(--fg-dim); background: #2a2a2a; border-color: #444; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 9px;
  border: 1px solid #454545;
  color: #bdbdbd;
  font-size: 11px;
  background: #262626;
}
.chip img { width: 13px; height: 13px; }
.chip.hot { border-color: rgba(246, 195, 60, 0.4); color: var(--gold); background: rgba(246, 195, 60, 0.07); }

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 3px;
  border: 1px solid #4a4a4a;
  background: #333333;
  color: #e0e0e0;
  font-size: 12px;
  white-space: nowrap;
}
.btn .icon { width: 14px; height: 14px; }
.btn:hover { background: #3d3d3d; border-color: #5a5a5a; }
.btn.primary { background: var(--accent); border-color: #1a86d9; color: #fff; }
.btn.primary:hover { background: #1585d8; }
.btn.gold { background: var(--gold); border-color: #d9a92c; color: #201a0a; font-weight: 600; }
.btn.gold:hover { background: #ffcf55; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-dim); }
.btn.ghost:hover { background: #2a2a2a; color: #ddd; }
.btn.danger { color: #f48771; }
.btn:disabled { opacity: 0.45; cursor: default; }

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 24px;
  align-items: start;
}

.panel {
  border: 1px solid #333;
  border-radius: 7px;
  background: #202020;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid #333;
  background: #242424;
}
.panel-head h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #bdbdbd;
}
.panel-head .hint { color: var(--fg-faint); font-size: 11px; }

.meta-row {
  display: flex;
  gap: 14px;
  padding: 7px 15px;
  border-bottom: 1px solid #2b2b2b;
  font-size: 12.5px;
  line-height: 1.5;
}
.meta-row:last-child { border-bottom: 0; }
.meta-label { flex: none; width: 165px; color: var(--fg-dim); }
.meta-value { min-width: 0; color: #d6d6d6; word-break: break-word; }
.meta-value.mono { font-family: var(--mono); font-size: 11.5px; }
.meta-value .subtle { color: var(--fg-faint); }

.summary-card {
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: linear-gradient(160deg, #262626 0%, #202020 60%);
  overflow: hidden;
  margin-bottom: 16px;
}
.summary-hero {
  display: flex;
  gap: 13px;
  padding: 17px;
  border-bottom: 1px solid #333;
}
.summary-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(246, 195, 60, 0.28), rgba(246, 195, 60, 0.06));
  border: 1px solid rgba(246, 195, 60, 0.25);
}
.summary-icon img { width: 30px; height: 30px; }
.summary-title { font-size: 13px; color: #eee; font-weight: 600; margin-bottom: 3px; }
.summary-sub { font-size: 11.5px; color: var(--fg-dim); line-height: 1.45; }
.summary-body { padding: 15px 17px 17px; }

.meter-block { margin-bottom: 14px; }
.meter-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--fg-dim); margin-bottom: 5px; }
.meter-label b { color: #ddd; font-weight: 500; }
.meter {
  height: 6px;
  border-radius: 3px;
  background: #383838;
  overflow: hidden;
}
.meter > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2f9e63, var(--green)); transition: width 0.5s ease; }

.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; padding: 5px 0; }
.kv span:first-child { color: var(--fg-dim); }
.kv span:last-child { color: #d5d5d5; font-family: var(--mono); font-size: 11px; text-align: right; }

.summary-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.summary-actions .btn { justify-content: center; }

.local-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px dashed #3d3d3d;
  border-radius: 7px;
  color: var(--fg-dim);
  font-size: 11.5px;
  line-height: 1.5;
}
.local-note .icon { width: 14px; height: 14px; color: var(--green); margin-top: 1px; }
.local-note b { color: #cfcfcf; font-weight: 600; }

/* Model info — matches the extension webview */
.info-page {
  padding: 12px 16px 30px;
  max-width: none;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.info-page h2 {
  margin: 0 0 4px;
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--fg);
  word-break: break-word;
}
.info-sub {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.info-sub .chip {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 1px 8px;
  border: 1px solid #454545;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-dim);
  font-size: 0.85em;
}
.info-row {
  display: flex;
  padding: 5px 0;
  border-bottom: 1px solid #333;
}
.info-label {
  flex: none;
  width: 190px;
  color: var(--fg-dim);
}
.info-value {
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Chat ---------- */
.view[data-view="chat"].active { display: flex; }
.chat-shell { display: flex; flex-direction: column; width: 100%; min-height: 0; background: var(--bg-editor); }

.chat-head {
  position: relative;
  z-index: 30;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid #2f2f2f;
  background: #1f1f1f;
}
.chat-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #e6e6e6;
}
.chat-head-title img { width: 18px; height: 18px; }
.chat-local-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(137, 209, 133, 0.32);
  background: rgba(137, 209, 133, 0.08);
  border-radius: 9px;
  padding: 2px 7px;
}
.chat-head-spacer { flex: 1; }
.chat-head-actions { display: flex; gap: 2px; }

.model-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  max-width: 340px;
  padding: 0 8px 0 6px;
  border: 1px solid #454545;
  border-radius: 5px;
  background: #2a2a2a;
  color: #dedede;
  font-size: 11.5px;
}
.model-pill:hover { background: #343434; border-color: #5a5a5a; }
.model-pill img { width: 15px; height: 15px; }
.model-pill .mp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-pill .mp-provider { color: var(--fg-dim); font-size: 10.5px; }
.model-pill .icon { width: 13px; height: 13px; color: #aaa; }
.model-pill .mp-gear { margin-left: 2px; color: #bbb; }
.model-pill .mp-gear:hover { color: #fff; }

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 22px 8px;
}
.chat-thread { max-width: 830px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.msg { display: flex; gap: 12px; }
.msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2f2f2f;
  border: 1px solid #444;
  color: #ccc;
  font-size: 13px;
  margin-top: 2px;
}
.msg-avatar img { width: 17px; height: 17px; }
.msg-main { min-width: 0; max-width: 88%; }
.msg.user .msg-main { display: flex; flex-direction: column; align-items: flex-end; }
.msg-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 10.5px; color: var(--fg-faint); }
.msg.user .msg-meta { justify-content: flex-end; }
.msg-author { color: #cfcfcf; font-size: 11.5px; font-weight: 600; }
.msg-bubble {
  border: 1px solid #333;
  background: #232323;
  border-radius: 8px;
  padding: 11px 14px;
  color: #d2d2d2;
  font-size: 13px;
  line-height: 1.62;
  word-wrap: break-word;
}
.msg.user .msg-bubble {
  background: #2b2b2b;
  border-color: #3d3d3d;
  color: #e2e2e2;
  border-bottom-right-radius: 2px;
}
.msg.assistant .msg-bubble { background: transparent; border: 0; padding: 0; color: #d7d7d7; }
.msg-bubble p { margin: 0 0 9px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble ul, .msg-bubble ol { margin: 4px 0 9px; padding-left: 20px; }
.msg-bubble li { margin: 2px 0; }
.msg-bubble code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: #2d2d2d;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  padding: 1px 4px;
  color: #d7ba7d;
}
.msg-bubble a { color: var(--accent-bright); text-decoration: none; }
.msg-bubble a:hover { text-decoration: underline; }
.msg-bubble strong { color: #f0f0f0; font-weight: 600; }

.code-block {
  margin: 10px 0;
  border: 1px solid #333;
  border-radius: 6px;
  background: #181818;
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #222;
  border-bottom: 1px solid #333;
  color: var(--fg-dim);
  font-size: 10.5px;
  letter-spacing: 0.3px;
}
.code-head .lang { text-transform: uppercase; font-weight: 600; font-size: 9.5px; color: #8fb7e8; letter-spacing: 0.7px; }
.code-head button { color: #bbb; display: flex; align-items: center; gap: 5px; font-size: 10.5px; }
.code-head button:hover { color: #fff; }
.code-head .icon { width: 12px; height: 12px; }
.code-block pre {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #d4d4d4;
}
.tok-key { color: #569cd6; }
.tok-str { color: #ce9178; }
.tok-num { color: #b5cea8; }
.tok-kw { color: #c586c0; }
.tok-com { color: #6a9955; }
.tok-fn { color: #dcdcaa; }
.tok-type { color: #4ec9b0; }

.context-card {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #3d3d3d;
  border-radius: 5px;
  background: #202020;
  font-size: 11px;
  color: var(--fg-dim);
}
.context-card .icon { width: 13px; height: 13px; color: #8fb7e8; }
.context-card b { color: #ccc; font-weight: 500; font-family: var(--mono); font-size: 10.5px; }

.thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  font-size: 12px;
}
.thinking .dots { display: inline-flex; gap: 3px; }
.thinking .dots i {
  width: 4px; height: 4px; border-radius: 50%; background: #aaa;
  animation: blink 1.2s infinite;
}
.thinking .dots i:nth-child(2) { animation-delay: 0.18s; }
.thinking .dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.2; } 30% { opacity: 1; } }

.msg-actions { display: flex; gap: 4px; margin-top: 8px; opacity: 0.7; }
.msg-actions button {
  width: 23px; height: 23px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: #aaa;
}
.msg-actions button:hover { background: #2e2e2e; color: #fff; }
.msg-actions .icon { width: 13px; height: 13px; }
.followups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.followup-chip {
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #454545;
  background: #262626;
  color: #bdbdbd;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
}
.followup-chip:hover { background: #333; color: #fff; }

.chat-compose {
  flex: none;
  padding: 8px 22px 10px;
  background: linear-gradient(180deg, transparent, var(--bg-editor) 40%);
}
.compose-inner { max-width: 830px; margin: 0 auto; }
.compose-context { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.compose-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid #3d3d3d;
  background: #252525;
  border-radius: 9px;
  color: #bdbdbd;
  font-size: 10.5px;
}
.compose-chip .icon { width: 11px; height: 11px; color: #8fb7e8; }
.compose-chip button { color: #999; display: grid; place-items: center; }
.compose-chip button:hover { color: #fff; }

.composer {
  border: 1px solid #454545;
  border-radius: 8px;
  background: #252526;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: border-color 0.12s ease;
}
.composer:focus-within { border-color: var(--accent); }
.composer textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 150px;
  resize: none;
  padding: 10px 12px 4px;
  border: 0;
  background: transparent;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  outline: none;
}
.composer textarea::placeholder { color: #7c7c7c; }
.composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px 6px;
}
.tool-btn {
  height: 24px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  color: #b7b7b7;
  font-size: 11px;
}
.tool-btn:hover { background: #333; color: #fff; }
.tool-btn .icon { width: 13px; height: 13px; }
.tool-btn.slash { font-family: var(--mono); font-size: 11px; }
.composer-tools .spacer { flex: 1; }
.send-btn {
  width: 27px; height: 27px;
  border-radius: 5px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
}
.send-btn:hover { background: #1585d8; }
.send-btn.stop { background: #444; }
.send-btn .icon { width: 14px; height: 14px; }
.compose-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 0;
  font-size: 10.5px;
  color: var(--fg-faint);
}
.compose-foot .local { display: inline-flex; align-items: center; gap: 4px; }
.compose-foot .local .icon { width: 10px; height: 10px; color: var(--green); }
.compose-foot .spacer { flex: 1; }
.compose-foot .tokens { font-variant-numeric: tabular-nums; }
.compose-foot .tokens b { color: #bdbdbd; font-weight: 500; }
.compose-foot.hidden { display: none; }

/* ---------- Model picker ---------- */
.model-picker {
  position: absolute;
  top: 51px;
  right: 14px;
  width: 470px;
  max-width: calc(100% - 28px);
  background: #252526;
  border: 1px solid #484848;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
  z-index: 60;
  overflow: hidden;
  animation: popIn 0.12s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.picker-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-bottom: 1px solid #3a3a3a;
}
.picker-search .icon { width: 14px; height: 14px; color: #999; }
.picker-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e4e4e4;
  font-family: inherit;
  font-size: 12px;
}
.picker-search input::placeholder { color: #7d7d7d; }
.picker-list { max-height: 380px; overflow-y: auto; padding: 5px 0; }
.picker-section {
  padding: 7px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #8b8b8b;
}
.picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: #d2d2d2;
  cursor: pointer;
}
.picker-item:hover { background: #2f2f2f; }
.picker-item.selected { background: #04395e; color: #fff; }
.picker-item .pi-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.picker-item .pi-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-item .pi-sub { color: #9d9d9d; font-size: 10.5px; white-space: nowrap; }
.picker-item .pi-provider { color: #9d9d9d; font-size: 10.5px; display: inline-flex; align-items: center; gap: 4px; }
.picker-item .pi-provider img { width: 12px; height: 12px; }
.picker-item .pi-badge {
  font-size: 9px;
  color: #8fb7e8;
  border: 1px solid #3d5d7c;
  border-radius: 7px;
  padding: 0 5px;
  line-height: 14px;
}
.picker-item .pi-check { width: 14px; height: 14px; color: #fff; }
.picker-item .pi-gear { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 3px; color: #aaa; }
.picker-item .pi-gear:hover { background: rgba(255,255,255,0.16); color: #fff; }
.picker-item .pi-gear .icon { width: 12px; height: 12px; }
.picker-sep { height: 1px; background: #3a3a3a; margin: 5px 0; }
.picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid #3a3a3a;
  color: #8f8f8f;
  font-size: 10.5px;
  background: #222;
}
.picker-footer .link { color: #8fb7e8; cursor: pointer; }
.picker-footer .link:hover { text-decoration: underline; }

/* ---------- Settings ---------- */
.settings-page { max-width: 980px; margin: 0 auto; padding: 22px 30px 50px; }
.settings-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: #2a2a2a;
  margin-bottom: 16px;
}
.settings-search .icon { width: 14px; height: 14px; color: #999; }
.settings-search input { flex: 1; border: 0; outline: 0; background: transparent; color: #ddd; font-family: inherit; font-size: 12px; }
.settings-crumbs { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--fg-dim); margin-bottom: 16px; }
.settings-crumbs b { color: #ddd; font-weight: 500; }
.settings-crumbs .sep { color: #666; }
.settings-group-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #e6e6e6;
  margin: 18px 0 4px;
}
.settings-group-title img { width: 18px; height: 18px; }
.setting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 13px 2px;
  border-bottom: 1px solid #2f2f2f;
}
.setting-text { min-width: 0; }
.setting-name { font-size: 12.5px; color: #d6d6d6; margin-bottom: 3px; font-weight: 500; }
.setting-desc { font-size: 11.5px; color: var(--fg-dim); line-height: 1.45; max-width: 600px; }
.setting-desc code { font-family: var(--mono); color: #c586c0; font-size: 10.5px; }
.setting-control { flex: none; padding-top: 1px; }
.vs-select, .vs-input {
  height: 26px;
  min-width: 150px;
  padding: 0 7px;
  border: 1px solid #4a4a4a;
  border-radius: 2px;
  background: #313131;
  color: #ddd;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
.vs-select:hover, .vs-input:hover { border-color: #5f5f5f; }
.vs-select:focus, .vs-input:focus { border-color: var(--accent); }
.vs-input { width: 110px; min-width: 0; font-family: var(--mono); font-size: 11px; }
.vs-select.small { min-width: 90px; }
.checkbox { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ---------- JSON ---------- */
.json-page { height: 100%; display: flex; flex-direction: column; }
.json-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid #2f2f2f;
  background: #202020;
}
.json-path { font-family: var(--mono); font-size: 11.5px; color: #bdbdbd; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.json-path span { color: #6f6f6f; }
.json-body { flex: 1; overflow: auto; padding: 14px 18px 40px; background: #1e1e1e; }
.json-body pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: #d4d4d4;
  tab-size: 2;
}
.json-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(137, 209, 133, 0.08);
  border: 1px solid rgba(137, 209, 133, 0.25);
  color: #a9cfa4;
  font-size: 11.5px;
}
.json-note .icon { width: 13px; height: 13px; color: var(--green); }
.json-note code { font-family: var(--mono); font-size: 10.5px; }

/* ---------- Quick pick / overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16vh;
  background: rgba(0, 0, 0, 0.12);
}
.quickpick {
  width: 620px;
  max-width: calc(100vw - 60px);
  background: #252526;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: popIn 0.1s ease-out;
}
.quickpick-input {
  width: 100%;
  height: 35px;
  padding: 0 12px;
  background: #3c3c3c;
  border: 0;
  border-bottom: 1px solid #333;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 13px;
  outline: 1px solid #007fd4;
  outline-offset: -1px;
}
.quickpick-input::placeholder { color: #8d8d8d; }
.quickpick-title {
  padding: 8px 12px 2px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #8d8d8d;
}
.quickpick-list { max-height: 46vh; overflow-y: auto; padding: 4px 0 6px; }
.qp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12.5px;
  color: #d4d4d4;
}
.qp-item:hover { background: #2f2f2f; }
.qp-item.active { background: #04395e; color: #fff; }
.qp-item .qp-main { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.qp-item .qp-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-item .qp-desc { color: #9d9d9d; font-size: 11px; flex: none; }
.qp-item.active .qp-desc { color: #c9def1; }
.qp-item .qp-check { width: 14px; height: 14px; color: #fff; flex: none; }
.qp-item .qp-check.empty { visibility: hidden; }
.qp-item .qp-detail {
  font-size: 10.5px;
  color: #8f8f8f;
  border: 1px solid #444;
  padding: 0 5px;
  border-radius: 7px;
  line-height: 15px;
}
.qp-sep { height: 1px; background: #3a3a3a; margin: 4px 0; }

/* Context menu */
.context-menu {
  position: fixed;
  min-width: 230px;
  background: #252526;
  border: 1px solid #454545;
  border-radius: 4px;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.55);
  padding: 4px;
  z-index: 1200;
  animation: popIn 0.08s ease-out;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 25px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 12px;
  color: #d4d4d4;
  cursor: pointer;
  white-space: nowrap;
}
.menu-item:hover { background: #04395e; color: #fff; }
.menu-item .icon { width: 14px; height: 14px; color: #bbb; }
.menu-item:hover .icon { color: #fff; }
.menu-item .shortcut { margin-left: auto; font-size: 10.5px; color: #8f8f8f; }
.menu-sep { height: 1px; background: #3d3d3d; margin: 4px 2px; }

/* Command palette */
.palette {
  width: 640px;
  max-width: calc(100vw - 40px);
  background: #252526;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin-top: -6vh;
}
.palette-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: #3c3c3c;
  border: 0;
  border-bottom: 1px solid #333;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 13px;
  outline: 1px solid #007fd4;
  outline-offset: -1px;
}
.palette-list { max-height: 50vh; overflow-y: auto; padding: 4px 0; }
.palette-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  padding: 0 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.palette-item:hover, .palette-item.active { background: #04395e; color: #fff; }
.palette-item .icon { width: 14px; height: 14px; color: #aaa; }
.palette-item .pi-cat { margin-left: auto; color: #8f8f8f; font-size: 10.5px; }
.palette-item:hover .pi-cat, .palette-item.active .pi-cat { color: #c9def1; }
.palette-empty { padding: 18px 14px; color: #8f8f8f; font-size: 12px; }

/* ---------- Toasts ---------- */
.toast-root {
  position: fixed;
  right: 14px;
  bottom: 34px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 340px;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  background: #252526;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.18s ease-out;
  font-size: 12px;
  color: #d4d4d4;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.toast .toast-icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--accent-bright);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast .toast-icon.success { color: var(--green); }
.toast .toast-icon.warn { color: var(--yellow); }
.toast-body { flex: 1; min-width: 0; line-height: 1.45; }
.toast-body b { color: #eee; font-weight: 600; }
.toast-body .toast-actions { display: flex; gap: 10px; margin-top: 6px; }
.toast-body .toast-actions button { color: #8fb7e8; font-size: 11px; }
.toast-body .toast-actions button:hover { text-decoration: underline; }
.toast-close { color: #999; width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.toast-close:hover { color: #fff; }
.toast.out { animation: slideOut 0.16s ease-in forwards; }
@keyframes slideOut { to { opacity: 0; transform: translateX(16px); } }

/* ---------- Tour ---------- */
.tour-spot {
  position: fixed;
  z-index: 3000;
  border-radius: 4px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 9999px rgba(4, 6, 10, 0.62), 0 0 24px rgba(246, 195, 60, 0.35);
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tour-popover {
  position: fixed;
  z-index: 3001;
  width: 370px;
  max-width: calc(100vw - 24px);
  background: #252526;
  border: 1px solid #4a4a4a;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  padding: 16px 18px 14px;
  animation: popIn 0.15s ease-out;
}
.tour-popover .tour-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 7px;
}
.tour-popover .tour-dots { display: flex; gap: 4px; }
.tour-popover .tour-dots i { width: 5px; height: 5px; border-radius: 50%; background: #4a4a4a; }
.tour-popover .tour-dots i.on { background: var(--gold); }
.tour-popover h3 { margin: 0 0 7px; font-size: 15px; font-weight: 600; color: #f0f0f0; }
.tour-popover p { margin: 0 0 14px; font-size: 12px; line-height: 1.55; color: #bdbdbd; }
.tour-popover p b { color: #e6e6e6; font-weight: 600; }
.tour-popover .tour-actions { display: flex; align-items: center; gap: 7px; }
.tour-popover .tour-actions .spacer { flex: 1; }
.tour-popover .btn { height: 25px; font-size: 11.5px; padding: 0 10px; }
.tour-popover .tour-skip { color: #8f8f8f; font-size: 11px; }
.tour-popover .tour-skip:hover { color: #ddd; }
.tour-keys {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #353535;
  font-size: 10px;
  color: #7f7f7f;
  letter-spacing: 0.2px;
}
.tour-keys kbd { font-size: 9px; padding: 0 3px; border-bottom-width: 1px; }
.tour-hint {
  position: fixed;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  z-index: 3002;
  background: #252526;
  border: 1px solid #4a4a4a;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  color: #aaa;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.tour-hint kbd { font-size: 9.5px; }
.tour-hint button { color: #f0c85a; margin-left: 6px; }
.tour-hint button:hover { text-decoration: underline; }

/* ---------- Dialogs (input / confirm) ---------- */
.dialog {
  width: 460px;
  max-width: calc(100vw - 40px);
  background: #252526;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.65);
  padding: 18px 20px 16px;
  animation: popIn 0.12s ease-out;
}
.dialog h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: #f0f0f0; }
.dialog-label { display: block; font-size: 11.5px; color: var(--fg-dim); margin-bottom: 6px; }
.dialog-input { width: 100%; height: 30px; min-width: 0; margin-bottom: 4px; font-size: 12.5px; font-family: var(--mono); }
.dialog-message { margin: 0 0 18px; font-size: 12px; line-height: 1.6; color: #bdbdbd; }
.dialog-message b { color: #e6e6e6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.btn.danger-solid { background: #a1260d; border-color: #c42b1c; color: #fff; }
.btn.danger-solid:hover { background: #c42b1c; }

/* Responsive */
@media (max-width: 1120px) {
  .main { grid-template-columns: 48px 286px minmax(0, 1fr); }
  .info-layout { grid-template-columns: 1fr; }
  .info-page { padding: 22px 22px 40px; }
  .meta-label { width: 145px; }
}
@media (max-width: 850px) {
  .main { grid-template-columns: 48px 260px minmax(0, 1fr); }
  .titlebar-center { display: none; }
  .msg-main { max-width: 94%; }
}
