:root {
  --bg: #071014;
  --panel: rgba(12, 27, 33, .88);
  --panel-strong: #102229;
  --line: rgba(112, 246, 206, .2);
  --line-bright: rgba(112, 246, 206, .68);
  --text: #e8fff9;
  --muted: #91afa9;
  --accent: #70f6ce;
  --accent-2: #80a9ff;
  --danger: #ff7b91;
  --shadow: 0 18px 60px rgba(0, 0, 0, .3);
  --ide-bg: #1e1e1e;
  --ide-panel: #252526;
  --ide-bar: #2b2d30;
  --ide-border: #3c3c3c;
  --ide-text: #cccccc;
  --ide-muted: #858585;
  --ide-blue: #007acc;
  --font-mono: "JetBrains Mono", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }

a { color: var(--accent); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
a:hover { color: #d5fff2; text-decoration: none; }

.neo-btn { color: #06221d; background: var(--accent); border: 1px solid var(--accent); border-radius: 4px; font-family: var(--font-mono); font-size: .78rem; font-weight: 700; padding: .55rem .9rem; }
.neo-btn:hover { color: #06221d; background: #d5fff2; border-color: #d5fff2; }
.neo-btn-ghost { color: var(--accent); background: transparent; border-color: var(--line-bright); }
.neo-btn-ghost:hover { background: rgba(112, 246, 206, .08); color: var(--text); border-color: var(--accent); }
.neo-btn-ghost.active { background: rgba(112, 246, 206, .14); color: #fff; }

.honeypot { position: absolute; left: -9999px; }

/* ===== Admin studio (IDE-aligned control plane) ===== */
.admin-body {
  --admin-bg: var(--ide-bg);
  --admin-panel: var(--ide-panel);
  --admin-bar: var(--ide-bar);
  --admin-border: var(--ide-border);
  --admin-text: var(--ide-text);
  --admin-muted: var(--ide-muted);
  --admin-accent: var(--ide-blue);
  --admin-danger: #f14c4c;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: var(--font-mono);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.admin-body a { color: #3794ff; }
.admin-body a:hover { color: #6cb6ff; }
.admin-body .form-control {
  background: #1e1e1e;
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.admin-body .form-control:focus {
  background: #1e1e1e;
  color: var(--admin-text);
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 1px var(--admin-accent);
}
.admin-body label {
  color: var(--admin-muted);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.admin-body label small { text-transform: none; letter-spacing: 0; color: var(--admin-muted); }

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 12px;
  background: var(--admin-bar);
  border-bottom: 1px solid var(--admin-border);
  flex-shrink: 0;
}
.admin-topbar-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-muted);
  font-size: .72rem;
}
.admin-topbar-actions { display: flex; align-items: center; gap: 4px; }
.admin-topbar-actions form { margin: 0; }
.admin-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--admin-muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: none;
}
.admin-topbar-link:hover { color: var(--admin-text); background: rgba(255, 255, 255, .06); }

.admin-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.admin-layout.is-login { justify-content: center; }
.admin-sidebar {
  flex: 0 0 248px;
  background: var(--admin-panel);
  border-right: 1px solid var(--admin-border);
  overflow-y: auto;
  padding: 8px 0 24px;
}
.admin-sidebar-section { margin-bottom: 10px; }
.admin-sidebar-label {
  color: var(--admin-muted);
  font-size: .65rem;
  letter-spacing: .08em;
  padding: 8px 14px 4px;
  user-select: none;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-text) !important;
  padding: 5px 14px;
  font-size: .78rem;
  text-decoration: none !important;
  border-left: 2px solid transparent;
}
.admin-nav-link .codicon { color: var(--admin-muted); font-size: 14px; }
.admin-nav-link:hover { background: rgba(255, 255, 255, .04); }
.admin-nav-link.is-active {
  background: rgba(0, 122, 204, .18);
  border-left-color: var(--admin-accent);
}
.admin-nav-link.is-active .codicon { color: #fff; }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.75rem 2.5rem;
  overflow: auto;
  background: var(--admin-bg);
}
.login-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
}
.admin-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 22px;
  padding: 0 10px;
  background: var(--admin-accent);
  color: #fff;
  font-size: .68rem;
  flex-shrink: 0;
}
.admin-statusbar span { display: inline-flex; align-items: center; gap: 5px; }

.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.admin-heading h1 {
  font-size: 1.55rem;
  margin: 0;
  color: #fff;
  font-weight: 600;
  letter-spacing: -.02em;
}
.admin-heading .eyebrow {
  margin-bottom: .35rem;
  color: var(--admin-accent);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.admin-lead {
  margin: .45rem 0 0;
  color: var(--admin-muted);
  font-size: .8rem;
  max-width: 56ch;
  line-height: 1.5;
}
.admin-heading-actions { display: flex; gap: .5rem; align-items: center; }

.admin-btn,
.admin-btn-ghost,
.admin-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  padding: .45rem .8rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
}
.admin-btn { color: #fff; background: var(--admin-accent); border-color: var(--admin-accent); }
.admin-btn:hover { color: #fff; background: #1a8ad4; border-color: #1a8ad4; }
.admin-btn-ghost { color: var(--admin-text); background: transparent; border-color: var(--admin-border); }
.admin-btn-ghost:hover,
.admin-btn-ghost.active { color: #fff; background: rgba(255, 255, 255, .06); border-color: #6c6c6c; }
.admin-btn-danger { color: #fff; background: #5a1d1d; border-color: var(--admin-danger); }
.admin-btn-danger:hover { background: #7a2424; color: #fff; }

.admin-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .65rem .85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--admin-border);
  border-radius: 2px;
  font-size: .8rem;
}
.admin-alert-success { background: rgba(35, 134, 54, .2); border-color: #238636; color: #3fb950; }
.admin-alert-error { background: rgba(248, 81, 73, .12); border-color: #f85149; color: #ff7b72; }

.admin-dash-group { margin-bottom: 1.75rem; }
.admin-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .7rem;
  font-weight: 600;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}
.admin-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1rem 1.1rem;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 2px;
  color: var(--admin-text) !important;
  text-decoration: none !important;
  transition: border-color .15s ease, background .15s ease;
}
.admin-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: #fff;
  font-weight: 600;
}
.admin-card span { color: var(--admin-muted); font-size: .74rem; line-height: 1.45; }
.admin-card:hover { border-color: var(--admin-accent); background: #2a2d2e; }

.admin-panel {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 2px;
  max-width: 980px;
}
.admin-panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  background: #2b2d30;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-muted);
  font-size: .72rem;
}
.admin-panel-bar .codicon { margin-right: 4px; }
.admin-form-body { padding: 1.25rem 1.35rem 1.45rem; }
.admin-form small,
.admin-file-current small { color: var(--admin-muted); display: block; }
.admin-form-actions { display: flex; gap: .6rem; margin-top: .5rem; }
.admin-file-field { display: flex; flex-direction: column; gap: .55rem; }
.admin-file-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  padding: .65rem;
  border: 1px solid var(--admin-border);
  background: #1e1e1e;
}
.clear-label {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--admin-text) !important;
  font-size: .75rem !important;
  cursor: pointer;
  margin: 0;
}

.admin-table-wrap { overflow-x: auto; }
.admin-table { color: var(--admin-text); margin-bottom: 0; font-size: .8rem; }
.admin-table th {
  color: var(--admin-muted);
  border-color: var(--admin-border) !important;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  background: #2b2d30;
}
.admin-table td {
  color: var(--admin-text);
  border-color: var(--admin-border) !important;
  vertical-align: middle;
  max-width: 280px;
  overflow-wrap: anywhere;
}
.admin-cell-clip {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-thumb {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid var(--admin-border);
}
.admin-thumb-lg {
  max-width: 180px;
  max-height: 180px;
  border: 1px solid var(--admin-border);
  border-radius: 2px;
}
.action-cell { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.action-cell form { display: inline; margin: 0; }
.table-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #3794ff;
  font-family: var(--font-mono);
  font-size: .72rem;
  cursor: pointer;
}
.danger-link { color: var(--admin-danger) !important; }
.empty-cell { padding: 2rem !important; text-align: center; color: var(--admin-muted); }

.admin-login { width: min(100%, 420px); }
.admin-login h1 { font-size: 1.6rem; margin: .2rem 0 .4rem; color: #fff; }
.admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--admin-border);
}
.admin-meta-label {
  display: block;
  color: var(--admin-muted);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}
.admin-detail-fields { padding: .25rem 0; }
.admin-detail-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--admin-border);
}
.admin-detail-value { color: var(--admin-text); font-size: .84rem; }
.admin-pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--admin-text);
}
.admin-chat-thread {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1rem 1.2rem 1.35rem;
}
.admin-chat-bubble {
  border: 1px solid var(--admin-border);
  border-radius: 2px;
  background: #1e1e1e;
  padding: .75rem .9rem;
}
.admin-chat-bubble.role-user { border-left: 3px solid var(--admin-accent); }
.admin-chat-bubble.role-assistant { border-left: 3px solid #3fb950; }
.admin-chat-bubble header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .45rem;
  color: var(--admin-muted);
  font-size: .7rem;
  text-transform: uppercase;
}
.admin-chat-bubble pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--admin-text);
}

/* Richtext / CKEditor — same document sheet as public article Preview */
.form-group-richtext { max-width: none; }
.richtext-shell { position: relative; }
.richtext-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.richtext-preview-pane {
  display: none;
  background: #1e1e1e;
  border: 1px solid var(--admin-border);
  padding: 16px;
  min-height: 280px;
}
.richtext-editor-host { min-height: 360px; }
.richtext-shell.mode-preview .richtext-editor-host,
.richtext-shell.mode-preview .ck.ck-editor,
.richtext-shell.mode-preview .richtext-source { display: none !important; }
.richtext-shell.mode-preview .richtext-preview-pane { display: block; }
.richtext-shell.mode-edit .richtext-preview-pane,
.richtext-shell.mode-edit .richtext-source { display: none !important; }
.richtext-shell.mode-source .richtext-editor-host,
.richtext-shell.mode-source .ck.ck-editor,
.richtext-shell.mode-source .richtext-preview-pane { display: none !important; }
.richtext-shell.mode-source .richtext-source,
.richtext-shell .richtext-source.is-fallback {
  display: block !important;
  position: static;
  width: 100%;
  height: auto;
  min-height: 320px;
  opacity: 1;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.richtext-shell .richtext-source {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.admin-body .ck.ck-editor { max-width: 100%; }
.admin-body .ck.ck-toolbar {
  background: #2b2d30 !important;
  border: 1px solid var(--admin-border) !important;
  border-bottom: 0 !important;
  border-radius: 2px 2px 0 0 !important;
}
.admin-body .ck.ck-toolbar .ck-toolbar__separator { background: var(--admin-border); }
.admin-body .ck.ck-button,
.admin-body .ck.ck-dropdown__button {
  color: var(--admin-text) !important;
}
.admin-body .ck.ck-button:not(.ck-disabled):hover,
.admin-body .ck.ck-button.ck-on {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}
.admin-body .ck.ck-icon { color: inherit !important; }
.admin-body .ck.ck-editor__main > .ck-editor__editable {
  border: 1px solid var(--admin-border) !important;
  border-radius: 0 0 2px 2px !important;
  box-shadow: none !important;
}
.admin-body .ck.ck-editor__editable_inline,
.admin-body .ck-editor__editable.ck-content.article-preview {
  min-height: 420px;
}
.admin-body .ck.ck-dropdown__panel,
.admin-body .ck.ck-list {
  background: var(--admin-panel) !important;
  border-color: var(--admin-border) !important;
  color: var(--admin-text) !important;
}
.admin-body .ck.ck-list__item .ck-button { color: var(--admin-text) !important; }
.ck.ck-balloon-panel,
.ck.ck-body .ck-balloon-panel { z-index: 10050 !important; }

.article-preview,
.ck-editor__editable.ck-content.article-preview,
.richtext-preview.article-preview {
  background: #fff;
  color: #1e1e1e;
  padding: 24px 28px;
  border-radius: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
  max-width: 820px;
}
.article-preview h1,
.article-preview h2,
.article-preview h3,
.ck-editor__editable.ck-content.article-preview h1,
.ck-editor__editable.ck-content.article-preview h2,
.ck-editor__editable.ck-content.article-preview h3 {
  font-family: var(--font-mono);
  color: #1e1e1e;
  line-height: 1.3;
  margin: 1.2em 0 .55em;
}
.article-preview h1,
.ck-editor__editable.ck-content.article-preview h1 { font-size: 1.7rem; }
.article-preview h2,
.ck-editor__editable.ck-content.article-preview h2 { font-size: 1.35rem; }
.article-preview h3,
.ck-editor__editable.ck-content.article-preview h3 { font-size: 1.15rem; }
.article-preview p,
.ck-editor__editable.ck-content.article-preview p { margin: 0 0 1em; }
.article-preview a,
.ck-editor__editable.ck-content.article-preview a { color: #0563c1; }
.article-preview blockquote,
.ck-editor__editable.ck-content.article-preview blockquote {
  margin: 1em 0;
  padding: .2em 0 .2em 1em;
  border-left: 3px solid #d0d0d0;
  color: #444;
}
.article-preview ul,
.article-preview ol,
.ck-editor__editable.ck-content.article-preview ul,
.ck-editor__editable.ck-content.article-preview ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.article-preview table,
.ck-editor__editable.ck-content.article-preview table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: .95em;
}
.article-preview th,
.article-preview td,
.ck-editor__editable.ck-content.article-preview th,
.ck-editor__editable.ck-content.article-preview td {
  border: 1px solid #d0d0d0;
  padding: .45em .65em;
  text-align: left;
}
.article-preview img,
.ck-editor__editable.ck-content.article-preview img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}
.article-preview figure,
.ck-editor__editable.ck-content.article-preview figure { margin: 1rem 0; }

@media (max-width: 900px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    flex: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 8px;
  }
  .admin-sidebar-section { margin-bottom: 0; }
  .admin-sidebar-label { grid-column: 1 / -1; }
  .admin-main { padding: 1rem; }
  .admin-heading { flex-direction: column; }
  .admin-detail-row { grid-template-columns: 1fr; gap: .35rem; }
}

/* ===== IDE workspace (locked viewport — visitor only) ===== */
html:has(body.ide-body) {
  height: 100%;
  overflow: hidden;
}
body.ide-body {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ide-bg);
  color: var(--ide-text);
  font-family: var(--font-mono);
  font-size: 13px;
  scrollbar-width: thin;
  scrollbar-color: rgba(121, 121, 121, .4) transparent;
}

/* VS Code-style scrollbars (vertical + horizontal) */
body.ide-body *,
body.ide-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(121, 121, 121, .4) transparent;
}
body.ide-body::-webkit-scrollbar,
body.ide-body *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body.ide-body::-webkit-scrollbar-corner,
body.ide-body *::-webkit-scrollbar-corner {
  background: transparent;
}
body.ide-body::-webkit-scrollbar-track,
body.ide-body *::-webkit-scrollbar-track {
  background: transparent;
}
body.ide-body::-webkit-scrollbar-thumb,
body.ide-body *::-webkit-scrollbar-thumb {
  background: rgba(121, 121, 121, .4);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 0;
  min-height: 20px;
  min-width: 20px;
}
body.ide-body::-webkit-scrollbar-thumb:hover,
body.ide-body *::-webkit-scrollbar-thumb:hover {
  background: rgba(121, 121, 121, .7);
  border: 2px solid transparent;
  background-clip: padding-box;
}
body.ide-body::-webkit-scrollbar-thumb:active,
body.ide-body *::-webkit-scrollbar-thumb:active {
  background: rgba(191, 191, 191, .5);
  border: 2px solid transparent;
  background-clip: padding-box;
}
body.ide-body::-webkit-scrollbar-button,
body.ide-body *::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.app-topbar {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: var(--ide-bar);
  border-bottom: 1px solid var(--ide-border);
  flex-shrink: 0;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.window-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.window-dots span:nth-child(1) { background: #ff5f57; }
.window-dots span:nth-child(2) { background: #febc2e; }
.window-dots span:nth-child(3) { background: #28c840; }

.topbar-title {
  flex: 1;
  min-width: 0;
  color: var(--ide-muted);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  color: #cccccc;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.topbar-icon-btn .codicon { font-size: 16px; }
.topbar-icon-btn:hover,
.topbar-icon-btn.is-active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.ide-workspace {
  height: calc(100vh - 38px);
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ide-bg);
}
.ide-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 48px 260px minmax(0, 1fr);
  overflow: hidden;
  background: var(--ide-bg);
}

.activity-bar {
  background: var(--ide-bar);
  border-right: 1px solid var(--ide-border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 4px;
  overflow: visible;
  position: relative;
  z-index: 40;
}
.activity-bar-primary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.activity-bar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  padding-bottom: 4px;
}
.activity-bar-extra-wrap {
  position: relative;
  border-top: 1px solid #2b2b2b;
  margin-top: 2px;
  padding-top: 2px;
}
.activity-bar-extra-wrap[hidden] { display: none !important; }
.activity-item {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #858585;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.activity-item[hidden] { display: none !important; }
.activity-item .codicon { font-size: 24px; }
.activity-item:hover { color: #fff; }
.activity-item.active,
.activity-item.is-current {
  color: #fff;
  border-left-color: #fff;
}
.activity-manage.active,
.activity-extra-btn.active {
  color: #fff;
  border-left-color: transparent;
}
.activity-extra-menu {
  position: absolute;
  left: calc(100% + 6px);
  bottom: 0;
  width: min(240px, calc(100vw - 64px));
  max-height: min(360px, calc(100vh - 80px));
  overflow: auto;
  background: #252526;
  border: 1px solid #454545;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 4px;
  z-index: 55;
}
.activity-extra-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ccc;
  font-size: 12px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.activity-extra-item:hover { background: #2a2d2e; color: #fff; }
.activity-extra-item .codicon { font-size: 16px; width: 18px; text-align: center; }
.activity-extra-empty {
  color: #858585;
  font-size: 12px;
  padding: 10px;
}
.activity-manage-menu {
  position: absolute;
  left: calc(100% + 6px);
  bottom: 8px;
  width: min(320px, calc(100vw - 64px));
  max-height: min(420px, calc(100vh - 80px));
  overflow: auto;
  background: #252526;
  border: 1px solid #454545;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 10px;
  z-index: 50;
}
.activity-manage-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.activity-manage-back {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  padding: 0;
}
.activity-manage-back:hover { background: #2a2d2e; color: #fff; }
.activity-manage-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 4px;
}
.activity-manage-header .activity-manage-title { margin-bottom: 0; }
.activity-manage-hint {
  font-size: 12px;
  color: #858585;
  margin: 0 0 10px;
  line-height: 1.4;
}
.activity-manage-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-manage-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1e1e1e;
  color: #ccc;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.activity-manage-nav-item:hover {
  background: #2a2d2e;
  color: #fff;
  border-color: #555;
}
.activity-manage-nav-item .codicon { font-size: 14px; color: #858585; }
.activity-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-manage-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 4px;
}
.activity-manage-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.activity-manage-name {
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
}
.activity-manage-kind {
  color: #6e6e6e;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.activity-manage-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.activity-place-btn {
  border: 1px solid #3c3c3c;
  background: #2a2d2e;
  color: #bbb;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.activity-place-btn:hover { color: #fff; border-color: #555; }
.activity-place-btn.active {
  background: #0e639c;
  border-color: #1177bb;
  color: #fff;
}

.side-pane {
  background: var(--ide-panel);
  border-right: 1px solid var(--ide-border);
  overflow: hidden;
  min-width: 0;
}
.pane {
  display: none;
  height: 100%;
  padding: 10px 8px;
  overflow: auto;
}
.pane.active { display: block; }
.pane-title {
  font-size: 11px;
  color: #bbbbbb;
  letter-spacing: .08em;
  margin: 4px 4px 10px;
  font-weight: 600;
}
.pane-hint { color: var(--ide-muted); font-size: 12px; padding: 0 4px; line-height: 1.5; }
.workspace-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin: 0 4px 8px;
  color: #cccccc;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.workspace-name .codicon { font-size: 14px; color: #c09553; }

.file-tree { display: flex; flex-direction: column; gap: 1px; }
.file-link {
  text-decoration: none;
  color: #cccccc;
  padding: 3px 8px;
  border-radius: 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 22px;
}
.file-link:hover { background: #2a2d2e; color: #fff; }
.file-link.active { background: #37373d; color: #fff; }
.file-link.nested { padding-left: 28px; }

/* VS Code / Seti-style file icons */
.file-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  opacity: .95;
}
.file-icon.icon-folder {
  color: #dcb67a;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.5 2A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 14.5 4H7.707l-.853-.854A.5.5 0 0 0 6.5 3H1.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.5 2A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 14.5 4H7.707l-.853-.854A.5.5 0 0 0 6.5 3H1.5z'/%3E%3C/svg%3E");
}
.tree-folder[open] > summary .icon-folder {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M.54 3.87.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.997 2.158l-.376 6A2 2 0 0 1 13.438 13H2.562a2 2 0 0 1-1.993-1.842L.192 5.158A2 2 0 0 1 .54 3.87z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M.54 3.87.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.997 2.158l-.376 6A2 2 0 0 1 13.438 13H2.562a2 2 0 0 1-1.993-1.842L.192 5.158A2 2 0 0 1 .54 3.87z'/%3E%3C/svg%3E");
}
.file-icon.icon-md { color: #519aba; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M14.85 3c.63 0 1.15.52 1.14 1.15v7.7c0 .63-.51 1.15-1.15 1.15H1.15C.52 13 0 12.48 0 11.85v-7.7C0 3.52.52 3 1.15 3ZM9 11V5H7L5.5 7.5 4 5H2v6h1.5V7.5L5.5 10H6l2-2.5V11Zm2.75.25L15 8.75 11.75 6l-.75.75L13.5 8.75 11 11z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M14.85 3c.63 0 1.15.52 1.14 1.15v7.7c0 .63-.51 1.15-1.15 1.15H1.15C.52 13 0 12.48 0 11.85v-7.7C0 3.52.52 3 1.15 3ZM9 11V5H7L5.5 7.5 4 5H2v6h1.5V7.5L5.5 10H6l2-2.5V11Zm2.75.25L15 8.75 11.75 6l-.75.75L13.5 8.75 11 11z'/%3E%3C/svg%3E"); }
.file-icon.icon-json { color: #cbcb41; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 2h4v1.5H3.5v9H6V14H2zm12 0h-4v1.5h2.5v9H10V14h4zM8.5 5h-1v2H5.5v1h2v2h1V8h2V7h-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 2h4v1.5H3.5v9H6V14H2zm12 0h-4v1.5h2.5v9H10V14h4zM8.5 5h-1v2H5.5v1h2v2h1V8h2V7h-2z'/%3E%3C/svg%3E"); }
.file-icon.icon-go { color: #519aba; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 4.5A1.5 1.5 0 0 1 2.5 3h11A1.5 1.5 0 0 1 15 4.5v7a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 11.5zM4 6v1h1.5a1 1 0 0 1 0 2H4v1h1.5a2 2 0 1 0 0-4zm5.5 0a2 2 0 0 0-1.8 1.1l.9.45A1 1 0 0 1 10.5 7a1 1 0 1 1 0 2 1 1 0 0 1-.9-.55l-.9.45A2 2 0 1 0 9.5 6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 4.5A1.5 1.5 0 0 1 2.5 3h11A1.5 1.5 0 0 1 15 4.5v7a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 11.5zM4 6v1h1.5a1 1 0 0 1 0 2H4v1h1.5a2 2 0 1 0 0-4zm5.5 0a2 2 0 0 0-1.8 1.1l.9.45A1 1 0 0 1 10.5 7a1 1 0 1 1 0 2 1 1 0 0 1-.9-.55l-.9.45A2 2 0 1 0 9.5 6z'/%3E%3C/svg%3E"); }
.file-icon.icon-yaml { color: #a074c4; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 2h5l1 2h6v10H2zm2 5v1.5h3V7zm0 3v1.5h5V10z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 2h5l1 2h6v10H2zm2 5v1.5h3V7zm0 3v1.5h5V10z'/%3E%3C/svg%3E"); }
.file-icon.icon-rust { color: #dea584; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.5 9.5 4l2.8.5-2 2.2.4 2.8L8 8.3l-2.7 1.2.4-2.8-2-2.2L6.5 4zM3 11.5h10v1.5H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1.5 9.5 4l2.8.5-2 2.2.4 2.8L8 8.3l-2.7 1.2.4-2.8-2-2.2L6.5 4zM3 11.5h10v1.5H3z'/%3E%3C/svg%3E"); }
.file-icon.icon-py { color: #519aba; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8.1 1C5.6 1 5.8 2.2 5.8 2.2v1.5h2.4v.5H4.2S2 4 2 7.1s1.7 2.9 1.7 2.9h1.1V8.4S4.7 6.8 6.5 6.8h2.7s1.6 0 1.6-1.5V3.7S11.2 1 8.1 1zm-.8 1.2a.6.6 0 1 1 0 1.2.6.6 0 0 1 0-1.2zM10.1 7.5v1.6s-.1 1.6-1.9 1.6H5.7s-1.7.1-1.7 1.7v2.1S3.8 16 7 16c2.9 0 3.1-1.2 3.1-1.2v-1.4H7.7v-.5h4.2s1.9.1 1.9-3.1-1.7-2.8-1.7-2.8h-1zM8.5 13a.6.6 0 1 1 0 1.2.6.6 0 0 1 0-1.2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8.1 1C5.6 1 5.8 2.2 5.8 2.2v1.5h2.4v.5H4.2S2 4 2 7.1s1.7 2.9 1.7 2.9h1.1V8.4S4.7 6.8 6.5 6.8h2.7s1.6 0 1.6-1.5V3.7S11.2 1 8.1 1zm-.8 1.2a.6.6 0 1 1 0 1.2.6.6 0 0 1 0-1.2zM10.1 7.5v1.6s-.1 1.6-1.9 1.6H5.7s-1.7.1-1.7 1.7v2.1S3.8 16 7 16c2.9 0 3.1-1.2 3.1-1.2v-1.4H7.7v-.5h4.2s1.9.1 1.9-3.1-1.7-2.8-1.7-2.8h-1zM8.5 13a.6.6 0 1 1 0 1.2.6.6 0 0 1 0-1.2z'/%3E%3C/svg%3E"); }
.file-icon.icon-html { color: #e37933; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='m1 2 1.2 12.2L8 16l5.8-1.8L15 2zm11.4 3.5H5.3l.2 1.8h6.7l-.5 5.1L8 13.2l-3.6-.9-.2-2.3h1.7l.1 1.2 2 .5 2-.5.3-2.7H4.5L3.9 4h8.7z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='m1 2 1.2 12.2L8 16l5.8-1.8L15 2zm11.4 3.5H5.3l.2 1.8h6.7l-.5 5.1L8 13.2l-3.6-.9-.2-2.3h1.7l.1 1.2 2 .5 2-.5.3-2.7H4.5L3.9 4h8.7z'/%3E%3C/svg%3E"); }
.file-icon.icon-sh { color: #89d185; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 3.5A1.5 1.5 0 0 1 2.5 2h11A1.5 1.5 0 0 1 15 3.5v9a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 12.5zM4.5 5 7 7.5 4.5 10 5.2 10.7 8.4 7.5 5.2 4.3zm4 5.5h3.5V12H8.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1 3.5A1.5 1.5 0 0 1 2.5 2h11A1.5 1.5 0 0 1 15 3.5v9a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 12.5zM4.5 5 7 7.5 4.5 10 5.2 10.7 8.4 7.5 5.2 4.3zm4 5.5h3.5V12H8.5z'/%3E%3C/svg%3E"); }
.file-icon.icon-pdf { color: #e37933; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 1.5A1.5 1.5 0 0 1 3.5 0h6.086a1.5 1.5 0 0 1 1.06.44l2.915 2.914A1.5 1.5 0 0 1 14 4.414V14.5A1.5 1.5 0 0 1 12.5 16h-9A1.5 1.5 0 0 1 2 14.5zM9 1v3h3zm-4.5 7H6a1.5 1.5 0 0 1 0 3H5.5v1.25a.75.75 0 0 1-1.5 0V8.75A.75.75 0 0 1 4.75 8zM5.5 9.5V10H6a.5.5 0 0 0 0-1zm3-.75v3.5a.75.75 0 0 0 1.5 0V11H11a.75.75 0 0 0 0-1.5H10V8.75a.75.75 0 0 0-1.5 0zM12.25 8a.75.75 0 0 0-.75.75v1H11a.75.75 0 0 0 0 1.5h.5v1a.75.75 0 0 0 1.5 0v-3.5A.75.75 0 0 0 12.25 8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M2 1.5A1.5 1.5 0 0 1 3.5 0h6.086a1.5 1.5 0 0 1 1.06.44l2.915 2.914A1.5 1.5 0 0 1 14 4.414V14.5A1.5 1.5 0 0 1 12.5 16h-9A1.5 1.5 0 0 1 2 14.5zM9 1v3h3zm-4.5 7H6a1.5 1.5 0 0 1 0 3H5.5v1.25a.75.75 0 0 1-1.5 0V8.75A.75.75 0 0 1 4.75 8zM5.5 9.5V10H6a.5.5 0 0 0 0-1zm3-.75v3.5a.75.75 0 0 0 1.5 0V11H11a.75.75 0 0 0 0-1.5H10V8.75a.75.75 0 0 0-1.5 0zM12.25 8a.75.75 0 0 0-.75.75v1H11a.75.75 0 0 0 0 1.5h.5v1a.75.75 0 0 0 1.5 0v-3.5A.75.75 0 0 0 12.25 8z'/%3E%3C/svg%3E"); }

.resume-file { height: 100%; display: flex; flex-direction: column; min-height: 0; padding-bottom: 0; }
.resume-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.resume-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 1px solid #2f2f2f;
  background: #111;
}

.tree-folder { margin: 2px 0; }
.tree-folder > summary {
  list-style: none;
  cursor: pointer;
  color: #cccccc;
  padding: 3px 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 22px;
}
.tree-folder > summary::-webkit-details-marker { display: none; }
.tree-folder > summary::before {
  content: "\eab6"; /* codicon-chevron-right */
  font-family: codicon;
  font-size: 14px;
  color: var(--ide-muted);
  width: 14px;
  flex: 0 0 14px;
}
.tree-folder[open] > summary::before { content: "\eab4"; /* codicon-chevron-down */ }
.folder-label a { color: inherit; text-decoration: none; }
.folder-label a:hover { color: #fff; }
.folder-children { display: flex; flex-direction: column; }
.tree-empty { color: var(--ide-muted); font-size: 12px; padding: 4px 28px; }

.editor-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--ide-bg);
}

.editor-titlebar {
  display: flex;
  align-items: stretch;
  background: #252526;
  border-bottom: 1px solid var(--ide-border);
  flex-shrink: 0;
  min-height: 35px;
}
.editor-tabstrip {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.editor-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  flex-shrink: 0;
  border-left: 1px solid transparent;
}
.editor-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #cccccc;
  cursor: pointer;
  padding: 0;
}
.editor-action-btn .codicon { font-size: 16px; }
.editor-action-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.editor-action-btn.active { color: #fff; background: rgba(255, 255, 255, .1); }
.editor-action-btn.run-contact .codicon,
#run_file_btn .codicon { color: #89d185; }
.editor-action-btn.run-contact:hover .codicon,
#run_file_btn:hover .codicon { color: #b5e8b0; }
.editor-tab {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--ide-border);
  background: #2d2d2d;
  color: #969696;
  padding: 0 8px 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 220px;
  height: 35px;
  position: relative;
}
.editor-tab .tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-tab .tab-codicon { font-size: 14px; }
.editor-tab .tab-icon { margin-right: 0; }
.editor-tab:hover { color: #fff; }
.editor-tab.active {
  background: var(--ide-bg);
  color: #fff;
}
.editor-tab.hidden { display: none; }
.tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  flex: 0 0 18px;
}
.tab-close .codicon { font-size: 14px; }
.editor-tab:hover .tab-close,
.editor-tab.active .tab-close { opacity: .7; }
.tab-close:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.editor-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--ide-bg);
}
.editor-view {
  display: none;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.editor-view.active {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.editor-view.active:has(.file-view.is-monaco) {
  overflow: hidden;
}

.file-view { padding: 16px 18px 24px; }
.file-view.is-monaco {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  padding: 0;
}
.file-view.is-monaco .md-preview-pane:not(.hidden),
.file-view.is-monaco .article-preview-pane:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.file-view.is-monaco .md-code-pane,
.file-view.is-monaco .article-code-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.file-view.is-monaco .article-toolbar {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ide-border);
  background: #252526;
}
.file-view.is-monaco .inline-log {
  flex-shrink: 0;
  margin: 0;
  padding: 6px 12px;
  border-top: 1px solid var(--ide-border);
  background: #252526;
}

.code-editor-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  background: var(--ide-bg);
}
.editor-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  flex-shrink: 0;
  height: 22px;
  padding: 0 12px;
  background: var(--ide-bg);
  border-bottom: 1px solid #2b2b2b;
  color: #cccccccc;
  font-size: 12px;
  font-family: var(--font-mono);
  user-select: none;
}
.breadcrumb-sep {
  font-size: 12px;
  color: #6f6f6f;
  margin: 0 2px;
}
.breadcrumb-item { color: #bbbbbb; }
.breadcrumb-item.current { color: #ffffff; }

.monaco-host {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.monaco-host .monaco-editor,
.monaco-host .monaco-editor-background,
.monaco-host .monaco-editor .margin {
  background-color: var(--ide-bg) !important;
}
.monaco-host .monaco-editor .view-overlays .current-line {
  border: none;
  background: rgba(255, 255, 255, .04);
}

.code {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 16px 18px 24px;
  white-space: pre;
  font-size: 13px;
  line-height: 1.55;
  font-family: var(--font-mono);
  color: #d4d4d4;
  overflow: auto;
}
.code code {
  font-family: inherit;
  font-size: inherit;
  white-space: inherit;
  background: transparent !important;
  text-shadow: none !important;
  padding: 0 !important;
}

.folder-banner {
  color: var(--ide-muted);
  margin-bottom: 12px;
  font-size: 12px;
}
.folder-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #ccc;
  text-decoration: none;
  border: 1px solid transparent;
}
.folder-entry:hover {
  background: #2a2d2e;
  color: #fff;
  border-color: #3c3c3c;
}

.search-tab { padding: 18px 20px; max-width: 920px; }
.search-tab-title { font-size: 20px; margin-bottom: 14px; color: #fff; font-weight: 500; }
.search-input, .search-input-lg {
  width: 100%;
  background: #3c3c3c;
  color: #fff;
  border: 1px solid #3c3c3c;
  border-radius: 2px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.search-input:focus, .search-input-lg:focus {
  outline: 1px solid #007fd4;
  border-color: #007fd4;
}
.search-meta { color: var(--ide-muted); font-size: 12px; margin-bottom: 12px; }
.search-results-panel { display: grid; gap: 14px; }
.search-group { border: 1px solid #2f2f2f; background: #252526; }
.search-file {
  display: block;
  padding: 8px 10px;
  background: #2d2d2d;
  color: #ccc;
  text-decoration: none;
  font-weight: 600;
}
.search-file:hover { color: #fff; }
.search-occurrence {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 5px 10px;
  color: #bbb;
  text-decoration: none;
  border-top: 1px solid #2a2a2a;
}
.search-occurrence:hover { background: #094771; color: #fff; }
.search-line { color: #858585; text-align: right; }
.search-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-search-results .search-occurrence { grid-template-columns: 36px 1fr; font-size: 11px; }
.side-search-results .search-file { font-size: 12px; }

.git-panel { padding: 18px 22px 28px; }
.git-panel-title { font-size: 18px; color: #fff; margin-bottom: 18px; }
.git-graph-visual { display: grid; gap: 0; max-width: 720px; }
.git-row { display: grid; grid-template-columns: 28px 1fr; gap: 12px; min-height: 64px; }
.git-rail { position: relative; display: flex; justify-content: center; }
.git-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3794ff;
  border: 2px solid #1e1e1e;
  box-shadow: 0 0 0 1px #3794ff;
  margin-top: 6px;
  z-index: 1;
}
.git-dot.kind-education { background: #b180d7; box-shadow: 0 0 0 1px #b180d7; }
.git-dot.kind-commit { background: #89d185; box-shadow: 0 0 0 1px #89d185; }
.git-line {
  position: absolute;
  top: 18px;
  bottom: -6px;
  width: 2px;
  background: #3c3c3c;
}
.git-card { padding: 4px 0 16px; }
.git-commit-msg { color: #e0e0e0; font-size: 13px; margin-bottom: 4px; }
.git-commit-meta { color: var(--ide-muted); font-size: 11px; }

.terminal-resizer {
  flex: 0 0 4px;
  cursor: row-resize;
  background: transparent;
  position: relative;
  z-index: 5;
}
.terminal-resizer:hover,
body.is-resizing-terminal .terminal-resizer {
  background: #007acc;
}
.terminal-resizer.hidden { display: none; }
body.is-resizing-terminal { cursor: row-resize; user-select: none; }

.terminal-pane {
  flex: 0 0 240px;
  background: #1e1e1e;
  border-top: 1px solid var(--ide-border);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}
.terminal-pane.hidden { display: none; }
.terminal-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 12px;
  background: #252526;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
  min-height: 35px;
}
.terminal-tabs { display: flex; align-items: center; gap: 8px; }
.terminal-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  border-bottom: 1px solid #fff;
  padding: 8px 4px;
}
.terminal-tab .codicon { font-size: 14px; }
.terminal-chrome-actions { display: flex; align-items: center; gap: 2px; }
.terminal-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #ccc;
  cursor: pointer;
  padding: 0;
}
.terminal-icon-btn .codicon { font-size: 14px; }
.terminal-icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.terminal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 12px 10px;
  cursor: text;
}
.terminal-body pre {
  margin: 0;
  padding: 0;
  color: #cccccc;
  font-size: 12px;
  line-height: 1.55;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-input-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 2px;
}
.terminal-prompt {
  color: #89d185;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  flex-shrink: 0;
}
.terminal-cmd {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  outline: none;
  padding: 0;
  caret-color: #fff;
}

.status-bar {
  flex: 0 0 22px;
  width: 100%;
  height: 22px;
  background: var(--ide-blue);
  color: #fff;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  z-index: 30;
}
.status-bar .codicon { font-size: 12px; margin-right: 3px; vertical-align: text-bottom; }
.status-right { margin-left: auto; }

.db-tables { display: flex; flex-direction: column; gap: 1px; }
.db-table-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #ccc;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}
.db-table-item:hover,
.db-table-item.active { background: #37373d; color: #fff; }
.db-table-item .codicon { font-size: 14px; color: #519aba; }
.db-panel { padding: 16px 18px 24px; height: 100%; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.db-panel-title { font-size: 18px; color: #fff; }
.db-panel-subtitle { color: var(--ide-muted); font-size: 12px; margin-top: 4px; }
.db-query-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.db-sql {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.db-sql:focus { outline: 1px solid #007fd4; border-color: #007fd4; }
.db-query-status { font-size: 12px; color: var(--ide-muted); min-height: 18px; }
.db-query-status.ok { color: #89d185; }
.db-query-status.err { color: #f48771; }
.db-results-wrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid #2f2f2f; }
.db-results { width: 100%; border-collapse: collapse; font-size: 12px; }
.db-results th, .db-results td {
  border-bottom: 1px solid #2f2f2f;
  border-right: 1px solid #2f2f2f;
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-results th { position: sticky; top: 0; background: #2d2d2d; color: #fff; z-index: 1; }
.db-results td { color: #ccc; background: #1e1e1e; }
.db-results tr:hover td { background: #252526; }

/* ---- GraphQL playground ---- */
.gql-schema-list { display: flex; flex-direction: column; gap: 1px; }
.gql-type-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #ccc;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}
.gql-type-item:hover,
.gql-type-item.active { background: #37373d; color: #fff; }
.gql-type-item .codicon { font-size: 14px; color: #b180d7; }
.gql-panel { padding: 16px 18px 24px; height: 100%; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.gql-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gql-panel-title { font-size: 18px; color: #fff; }
.gql-panel-subtitle { color: var(--ide-muted); font-size: 12px; margin-top: 4px; }
.gql-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gql-query-col,
.gql-response-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gql-col-label {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ide-muted);
}
.gql-query {
  flex: 1;
  min-height: 180px;
  resize: vertical;
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
}
.gql-query:focus { outline: 1px solid #007fd4; border-color: #007fd4; }
.gql-response {
  flex: 1;
  min-height: 180px;
  margin: 0;
  overflow: auto;
  background: #1e1e1e;
  color: #ceb;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.gql-query-status { font-size: 12px; color: var(--ide-muted); min-height: 18px; }
.gql-query-status.ok { color: #89d185; }
.gql-query-status.err { color: #f48771; }
@media (max-width: 900px) {
  .gql-split { grid-template-columns: 1fr; }
}

/* ---- Extensions marketplace ---- */
.pane-extensions {
  display: none;
  padding: 10px 0 12px;
  overflow: hidden;
}
.pane-extensions.active { display: flex; flex-direction: column; }
.pane-extensions .pane-title { margin-left: 12px; margin-right: 12px; }
.pane-extensions .search-input { margin: 0 12px 8px; width: calc(100% - 24px); }
.ext-filter-row {
  display: flex;
  gap: 4px;
  padding: 0 12px 10px;
}
.ext-filter {
  border: 0;
  background: transparent;
  color: var(--ide-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.ext-filter:hover { color: #fff; background: #2a2d2e; }
.ext-filter.active { color: #fff; background: #37373d; }
.ext-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 12px;
}
.ext-group-title {
  font-size: 11px;
  color: #bbbbbb;
  letter-spacing: .06em;
  font-weight: 700;
  padding: 10px 14px 6px;
}
.ext-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 6px 10px 6px 8px;
  border-left: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.ext-item:hover,
.ext-item.active {
  background: #2a2d2e;
}
.ext-item.active { border-left-color: #007acc; }
.ext-item-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 2px;
  cursor: pointer;
  min-width: 0;
  font-family: var(--font-mono);
}
.ext-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2d2d30;
  background: color-mix(in srgb, var(--ext-accent, #007acc) 22%, #1e1e1e);
  color: var(--ext-accent, #007acc);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.ext-icon .codicon { font-size: 18px; }
.ext-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 10px;
}
.ext-icon-lg .codicon { font-size: 32px; }
.ext-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ext-item-name {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ext-item-desc {
  color: #9d9d9d;
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ext-item-meta {
  color: #6e6e6e;
  font-size: 10px;
}
.ext-action-btn {
  border: 1px solid #474747;
  background: #0e639c;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 64px;
  transition: background .15s ease, transform .12s ease;
}
.ext-action-btn:hover { background: #1177bb; }
.ext-action-btn.is-installed {
  background: transparent;
  color: #cccccc;
}
.ext-action-btn.is-installed:hover {
  background: #37373d;
  color: #fff;
}
.ext-action-btn.is-flash,
.ext-ghost-btn.is-flash {
  background: #2ea043 !important;
  border-color: #2ea043 !important;
  color: #fff !important;
}

.ext-workspace {
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: #1e1e1e;
}
.ext-welcome {
  max-width: 520px;
  margin: 12vh auto 0;
  text-align: center;
  padding: 24px;
  animation: extFadeUp .28s ease;
}
.ext-welcome-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #252526;
  border: 1px solid #3c3c3c;
  color: #cccccc;
}
.ext-welcome-icon .codicon { font-size: 36px; }
.ext-welcome h2 {
  color: #fff;
  font-size: 22px;
  margin: 0 0 10px;
  font-weight: 500;
}
.ext-welcome p {
  color: var(--ide-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.ext-welcome-stats {
  color: #6e6e6e;
  font-size: 11px;
  font-family: var(--font-mono);
}

.ext-detail {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.ext-detail-enter { animation: extFadeUp .24s ease; }
.ext-detail-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #2f2f2f;
  background: linear-gradient(180deg, #252526 0%, #1e1e1e 100%);
}
.ext-detail-title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 22px;
  font-weight: 500;
}
.ext-detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #9d9d9d;
  font-size: 12px;
  margin-bottom: 8px;
}
.ext-dot { color: #5a5a5a; }
.ext-badge {
  color: #89d185;
  background: rgba(137, 209, 133, .12);
  border: 1px solid rgba(137, 209, 133, .28);
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ext-badge.is-muted {
  color: #bbbbbb;
  background: rgba(204, 204, 204, .08);
  border-color: rgba(204, 204, 204, .2);
}
.ext-tool-locked {
  margin: 18px 22px;
  padding: 16px;
  border: 1px dashed #3c3c3c;
  border-radius: 6px;
  color: #858585;
  font-size: 13px;
  background: #1e1e1e;
}
.ext-detail-desc {
  margin: 0;
  color: #cccccc;
  font-size: 13px;
  line-height: 1.55;
  max-width: 720px;
}
.ext-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 120px;
}
.ext-primary-btn,
.ext-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.ext-primary-btn {
  border: 1px solid #007fd4;
  background: #0e639c;
  color: #fff;
}
.ext-primary-btn:hover { background: #1177bb; }
.ext-ghost-btn {
  border: 1px solid #474747;
  background: transparent;
  color: #cccccc;
}
.ext-ghost-btn:hover {
  background: #2a2d2e;
  color: #fff;
}
.ext-tool-host {
  flex: 1;
  min-height: 0;
  padding: 0 0 24px;
}
.ext-tool {
  animation: extFadeUp .2s ease;
}
.ext-tool-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 22px;
  border-bottom: 1px solid #2f2f2f;
  background: #252526;
}
.ext-tool-bar-title {
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ext-tool-bar-hint { color: #6e6e6e; font-size: 11px; }
.ext-tool-body {
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1100px;
}
.ext-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ext-field-label {
  color: #9d9d9d;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ext-input,
.ext-select,
.ext-textarea {
  width: 100%;
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #3c3c3c;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 10px;
  outline: none;
}
.ext-input:focus,
.ext-select:focus,
.ext-textarea:focus {
  border-color: #007fd4;
  box-shadow: 0 0 0 1px #007fd4;
}
.ext-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.45;
}
.ext-textarea-sm { min-height: 88px; }
.ext-textarea-lg { min-height: 220px; }
.ext-select { cursor: pointer; }
.ext-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ext-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ext-split-color {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 18px;
  align-items: start;
}
.ext-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ext-output {
  margin: 0;
  min-height: 88px;
  max-height: 320px;
  overflow: auto;
  background: #111;
  border: 1px solid #2f2f2f;
  border-radius: 2px;
  padding: 10px 12px;
  color: #d4d4d4;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.ext-output-lg { min-height: 64px; font-size: 14px; }
.ext-regex-out mark {
  background: rgba(206, 145, 120, .35);
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
}
.ext-status {
  min-height: 18px;
  font-size: 12px;
  color: var(--ide-muted);
}
.ext-status.ok { color: #89d185; }
.ext-status.err { color: #f48771; }
.ext-kv {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid #2f2f2f;
  background: #111;
}
.ext-kv-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #2a2a2a;
  font-size: 12px;
}
.ext-kv-row:last-child { border-bottom: 0; }
.ext-kv-row span { color: #9d9d9d; }
.ext-kv-row code {
  color: #d4d4d4;
  font-family: var(--font-mono);
  word-break: break-all;
}
.ext-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #cccccc;
  font-size: 12px;
}
.ext-flags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cccccc;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  cursor: pointer;
}
.ext-flags input { accent-color: #0e639c; }
.ext-swatch-wrap {
  border: 1px solid #2f2f2f;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.ext-swatch { flex: 1; min-height: 140px; transition: background .2s ease; }
.ext-swatch-label {
  padding: 8px 10px;
  font-size: 12px;
  color: #cccccc;
  border-top: 1px solid #2f2f2f;
  font-family: var(--font-mono);
}
.ext-color-picker {
  width: 42px;
  height: 34px;
  border: 1px solid #474747;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  border-radius: 2px;
}
.ext-findings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ext-finding {
  border: 1px solid #2f2f2f;
  border-left-width: 3px;
  background: #181818;
  padding: 10px 12px;
  border-radius: 2px;
  animation: extFadeUp .18s ease;
}
.ext-finding.level-error { border-left-color: #f48771; }
.ext-finding.level-warn { border-left-color: #cca700; }
.ext-finding.level-info { border-left-color: #3794ff; }
.ext-finding.level-ok { border-left-color: #89d185; }
.ext-finding-title {
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ext-finding-detail {
  color: #9d9d9d;
  font-size: 12px;
  line-height: 1.45;
}

.ext-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ext-chip {
  border: 1px solid #3c3c3c;
  background: #2a2a2a;
  color: #cccccc;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ext-chip:hover { background: #333; color: #fff; }
.ext-chip.active {
  background: #094771;
  border-color: #007acc;
  color: #fff;
}

.ext-http-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 12px;
  min-height: 280px;
}
.ext-http-list {
  border: 1px solid #2f2f2f;
  background: #111;
  overflow: auto;
  max-height: 420px;
  display: flex;
  flex-direction: column;
}
.ext-http-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #222;
  background: transparent;
  color: #cccccc;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: background .12s ease;
}
.ext-http-row:hover { background: #1f1f1f; }
.ext-http-row.active {
  background: #094771;
  color: #fff;
}
.ext-http-row-code {
  font-weight: 700;
  min-width: 36px;
}
.ext-http-row-code.cat-1xx,
.ext-http-code-badge.cat-1xx { color: #9cdcfe; }
.ext-http-row-code.cat-2xx,
.ext-http-code-badge.cat-2xx { color: #89d185; }
.ext-http-row-code.cat-3xx,
.ext-http-code-badge.cat-3xx { color: #dcdcaa; }
.ext-http-row-code.cat-4xx,
.ext-http-code-badge.cat-4xx { color: #ce9178; }
.ext-http-row-code.cat-5xx,
.ext-http-code-badge.cat-5xx { color: #f48771; }
.ext-http-row.active .ext-http-row-code { color: #fff; }
.ext-http-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ext-http-detail {
  border: 1px solid #2f2f2f;
  background: #181818;
  padding: 16px;
  animation: extFadeUp .18s ease;
}
.ext-http-empty {
  color: #6e6e6e;
  font-size: 12px;
  padding: 24px 8px;
  text-align: center;
}
.ext-http-code-badge {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.ext-http-name {
  margin: 0 0 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.ext-http-cat {
  color: #6e6e6e;
  font-size: 11px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ext-hash-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ext-hash-row {
  border: 1px solid #2f2f2f;
  background: #111;
  padding: 10px 12px;
  border-radius: 2px;
  animation: extFadeUp .16s ease;
}
.ext-hash-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ext-hash-algo {
  color: #9cdcfe;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ext-hash-copy {
  padding: 2px 8px !important;
  font-size: 11px !important;
  min-height: 0;
}
.ext-hash-value {
  display: block;
  color: #d4d4d4;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  line-height: 1.45;
}

.ext-jwt-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  padding: 10px 12px;
  background: #111;
  border: 1px solid #2f2f2f;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  word-break: break-all;
  min-height: 42px;
}
.ext-jwt-seg.seg-header { color: #fb7185; }
.ext-jwt-seg.seg-payload { color: #c084fc; }
.ext-jwt-seg.seg-signature { color: #38bdf8; }
.ext-jwt-seg.seg-extra { color: #9d9d9d; }
.ext-jwt-dot { color: #6e6e6e; user-select: none; }

.ext-diag-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ext-diag-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid #3c3c3c;
  background: #252526;
  color: #cccccc;
  font-family: var(--font-mono);
}
.ext-diag-pill.level-error {
  border-color: #5a2d2d;
  color: #f48771;
  background: #2a1a1a;
}
.ext-diag-pill.level-warn {
  border-color: #5a4d1a;
  color: #cca700;
  background: #2a2618;
}
.ext-diag-pill.level-info {
  border-color: #1a3a5a;
  color: #3794ff;
  background: #152030;
}

@keyframes extFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .ext-detail-header {
    grid-template-columns: auto 1fr;
  }
  .ext-detail-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .ext-split,
  .ext-split-color,
  .ext-grid-3,
  .ext-http-layout {
    grid-template-columns: 1fr;
  }
  .ext-kv-row { grid-template-columns: 100px 1fr; }
}

.inline-log { margin-top: 10px; font-size: 12px; }
.inline-log.ok { color: #89d185; }
.inline-log.err { color: #f48771; }

.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.article-filename { color: var(--ide-muted); }
.article-modes { display: flex; gap: 6px; }

.md-preview-tab, .md-preview-pane {
  padding: 20px 28px 40px;
  background: #1e1e1e;
  min-height: 100%;
}
.md-preview-body {
  max-width: 860px;
  color: #cccccc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
.md-preview-body h1,
.md-preview-body h2,
.md-preview-body h3 {
  color: #fff;
  border-bottom: 1px solid #30363d;
  padding-bottom: .3em;
  margin-top: 1.2em;
}
.md-preview-body a { color: #3794ff; }
.md-preview-body code {
  background: #2d2d2d;
  padding: .15em .35em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .9em;
}
.md-preview-body pre {
  background: #0d1117;
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
}
.md-preview-body ul { padding-left: 1.4rem; }

.hidden { display: none !important; }

/* ---- Cursor-style AI chat pane ---- */
.ai-chat-backdrop {
  position: fixed;
  inset: 38px 0 0 0;
  background: rgba(0, 0, 0, .35);
  z-index: 40;
}
.ai-chat-pane {
  position: fixed;
  top: 38px;
  right: 0;
  bottom: 0;
  width: min(380px, 100vw);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #181818;
  border-left: 1px solid var(--ide-border);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .35);
  transform: translateX(105%);
  transition: transform .18s ease;
  font-family: var(--font-mono);
}
.ai-chat-pane.is-open {
  transform: translateX(0);
}
.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid var(--ide-border);
  background: #1f1f1f;
  flex-shrink: 0;
}
.ai-chat-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e4e4e4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.ai-chat-title .codicon { color: #79b8ff; font-size: 14px; }
.ai-chat-header-actions { display: inline-flex; gap: 2px; }
.ai-chat-icon-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #cccccc;
  cursor: pointer;
  padding: 0;
}
.ai-chat-icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ai-chat-icon-btn.is-active { background: rgba(255, 255, 255, .1); color: #fff; }
.ai-chat-icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.ai-chat-history {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #181818;
}
.ai-chat-pane.is-history .ai-chat-modebar,
.ai-chat-pane.is-history .ai-chat-messages,
.ai-chat-pane.is-history .ai-chat-suggestions,
.ai-chat-pane.is-history .ai-chat-composer {
  display: none;
}
.ai-chat-history-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ide-border);
  color: #cfcfcf;
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.ai-chat-history-back {
  background: transparent;
  border: 0;
  color: #79b8ff;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
}
.ai-chat-history-back:hover { color: #a8d4ff; text-decoration: underline; }
.ai-chat-history-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-chat-history-empty {
  margin: auto 0;
  padding: 24px 16px;
  color: var(--ide-muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.ai-chat-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 2px;
  align-items: stretch;
  border-radius: 6px;
}
.ai-chat-history-item.is-active {
  background: rgba(14, 99, 156, .22);
}
.ai-chat-history-open {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e4e4e4;
  font-family: inherit;
  cursor: pointer;
}
.ai-chat-history-open:hover { background: rgba(255, 255, 255, .06); }
.ai-chat-history-title {
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ai-chat-history-meta {
  font-size: 10.5px;
  color: var(--ide-muted);
}
.ai-chat-history-remove {
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  padding: 0;
}
.ai-chat-history-remove:hover {
  background: rgba(244, 135, 113, .12);
  color: #f48771;
}
.ai-chat-modebar {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ide-border);
  background: #1a1a1a;
  flex-shrink: 0;
}
.ai-chat-mode-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  border: 1px solid #3c3c3c;
  border-radius: 6px;
  background: #252526;
  color: #b5b5b5;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 8px;
}
.ai-chat-mode-btn .codicon { font-size: 13px; }
.ai-chat-mode-btn:hover { color: #fff; border-color: #555; }
.ai-chat-mode-btn.is-active {
  background: #0e639c;
  border-color: #0e639c;
  color: #fff;
}
.ai-chat-mode-btn:disabled { opacity: .55; cursor: not-allowed; }
.ai-chat-pane[data-mode="agent"] .ai-chat-mode-btn[data-mode="agent"].is-active {
  background: #3a3d41;
  border-color: #89d185;
  color: #89d185;
}
.ai-chat-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-chat-empty {
  margin: auto 0;
  color: var(--ide-muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  padding: 0 8px;
}
.ai-chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-chat-bubble.user {
  align-self: flex-end;
  background: #0e639c;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.ai-chat-bubble.assistant {
  align-self: flex-start;
  background: #2a2a2a;
  color: #e8e8e8;
  border: 1px solid #3a3a3a;
  border-bottom-left-radius: 3px;
}
.ai-chat-bubble.assistant.pending {
  color: var(--ide-muted);
  font-style: italic;
}
.ai-chat-action {
  align-self: stretch;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px dashed #3c3c3c;
  color: var(--ide-muted);
}
.ai-chat-action.ok {
  border-color: #3d6b45;
  color: #89d185;
  background: rgba(137, 209, 133, .08);
}
.ai-chat-action.err {
  border-color: #6b3d3d;
  color: #f48771;
  background: rgba(244, 135, 113, .08);
}
.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
  flex-shrink: 0;
}
.ai-chat-suggestions.is-hidden { display: none; }
.ai-chat-suggestion {
  background: #252526;
  border: 1px solid #3c3c3c;
  color: #d4d4d4;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s ease, background .12s ease;
}
.ai-chat-suggestion:hover {
  background: #2d2d30;
  border-color: #007acc;
  color: #fff;
}
.ai-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 12px 14px;
  border-top: 1px solid var(--ide-border);
  background: #1f1f1f;
  flex-shrink: 0;
}
.ai-chat-input {
  flex: 1;
  min-height: 38px;
  max-height: 120px;
  resize: none;
  background: #141414;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  color: #e8e8e8;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  outline: none;
}
.ai-chat-input:focus { border-color: #007acc; }
.ai-chat-input:disabled { opacity: .65; }
.ai-chat-send {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0e639c;
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.ai-chat-send:hover { background: #1177bb; }
.ai-chat-send:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .ide-shell { grid-template-columns: 48px minmax(0, 1fr); }
  .side-pane { display: none; }
  .ai-chat-pane { width: 100vw; }
}
