/* ============================================================
   IQ-AI Template Studio — Main Stylesheet
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(14px, 1.1vw, 18px); }
body { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; background: #f1f5f9; color: #1e293b; line-height: 1.5; }
a { color: #6366f1; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.layout { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 240px; min-width: 240px;
  background: #1e293b; color: #e2e8f0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 20px 16px 14px;
  font-size: 1.05rem; font-weight: 700; color: #fff;
  border-bottom: 1px solid #334155;
}
.brand-icon { font-size: 1.3rem; }
.sidebar-user { padding: 12px 16px 10px; border-bottom: 1px solid #334155; }
.user-name { font-weight: 600; font-size: 0.9rem; color: #f1f5f9; }
.user-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.role-badge {
  background: #6366f1; color: #fff; border-radius: 10px;
  padding: 1px 8px; font-size: 0.72rem; font-weight: 600;
}
.user-email { font-size: 0.72rem; color: #94a3b8; word-break: break-all; }

.sidebar-status { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid #334155; }
.env-badge {
  font-size: 0.68rem; font-weight: 700; border-radius: 4px; padding: 2px 6px;
  text-transform: uppercase;
}
.env-badge.env-local, .env-badge.env-local-dev { background: #334155; color: #94a3b8; }
.env-badge.env-integration, .env-badge.env-local-iis-integration { background: #854d0e; color: #fef9c3; }
.env-badge.env-staging { background: #1e40af; color: #dbeafe; }
.env-badge.env-production { background: #991b1b; color: #fee2e2; }
.api-health-dot { font-size: 0.7rem; color: #6b7280; transition: color 0.3s; }
.api-health-dot.up { color: #22c55e; }
.api-health-dot.down { color: #ef4444; }
.api-health-label { font-size: 0.72rem; color: #94a3b8; }
.sidebar-divider { border: none; border-top: 1px solid #334155; margin: 0; }

/* Sidebar nav */
.sidebar-nav { padding: 8px 8px 16px; flex: 1; }
.nav-section-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; padding: 10px 8px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px;
  font-size: 0.875rem; color: #cbd5e1;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.nav-item:hover { background: #334155; color: #f1f5f9; text-decoration: none; }
.nav-item.active { background: #6366f1; color: #fff; font-weight: 600; }
.nav-icon { font-size: 0.95rem; }

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.top-header {
  background: #fff; border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-theme-select { display: inline-flex; align-items: center; gap: 6px; }
.label-inline { font-size: 0.78rem; color: var(--text-secondary, #475569); white-space: nowrap; }
.form-control-sm { height: 28px; padding: 0 8px; font-size: 0.78rem; border-radius: var(--border-radius, 8px); border: 1px solid var(--border, #e2e8f0); background: var(--bg-input, #f8fafc); color: var(--text-primary, #0f172a); cursor: pointer; }
.form-control-sm:focus { outline: none; border-color: var(--primary, #6366f1); }
.page-content { padding: 24px; flex: 1; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; }
.breadcrumb-item { color: #64748b; }
.breadcrumb-item:not(.breadcrumb-current):hover { color: #6366f1; }
.breadcrumb-sep { color: #94a3b8; }
.breadcrumb-current { color: #1e293b; font-weight: 500; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; color: #0f172a; }
.page-subtitle { color: #64748b; font-size: 0.9rem; margin-top: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 500; transition: all 0.15s; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #6366f1; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #4f46e5; }
.btn-secondary { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; margin-bottom: 6px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 16px;
}
.filter-input {
  border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 10px; font-size: 0.875rem;
  background: #f8fafc; min-width: 140px; flex: 1;
}
.filter-input:focus { outline: 2px solid #6366f1; border-color: transparent; background: #fff; }
.filter-search { min-width: 220px; }
.filter-select {
  border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc;
  padding: 6px 10px; font-size: 0.875rem; cursor: pointer;
}

/* ============================================================
   VIEW BAR (grid/table toggle)
   ============================================================ */
.view-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.view-toggle { display: flex; gap: 4px; }
.view-btn.active { background: #6366f1; color: #fff; border-color: #6366f1; }
.asset-count { font-size: 0.85rem; color: #64748b; }

/* ============================================================
   ASSET GRID (3-col)
   ============================================================ */
.asset-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px;
}
@media (max-width: 900px) { .asset-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .asset-grid { grid-template-columns: 1fr; } }

/* Asset type color palette */
:root {
  --color-prompt_template: #6366f1;
  --color-workflow_template: #0ea5e9;
  --color-response_template: #10b981;
  --color-section_template: #84cc16;
  --color-widget_template: #f59e0b;
  --color-header_footer_template: #ec4899;
  --color-theme: #8b5cf6;
  --color-schema: #14b8a6;
  --color-policy: #ef4444;
  --color-tenant_override: #f97316;
}

.asset-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 14px; cursor: pointer; transition: box-shadow 0.15s, transform 0.1s;
  border-left: 4px solid #6b7280; position: relative;
}
.asset-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.card-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.card-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.card-meta { font-size: 0.78rem; color: #64748b; margin-bottom: 4px; }
.card-desc { font-size: 0.78rem; color: #374151; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { margin-top: 8px; }

/* ============================================================
   TYPE BADGES
   ============================================================ */
.type-badge {
  display: inline-block; padding: 1px 9px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 600; color: #fff; background: #6b7280;
}
.type-badge[data-type="prompt_template"] { background: var(--color-prompt_template); }
.type-badge[data-type="workflow_template"] { background: var(--color-workflow_template); }
.type-badge[data-type="response_template"] { background: var(--color-response_template); }
.type-badge[data-type="section_template"] { background: var(--color-section_template); }
.type-badge[data-type="widget_template"] { background: var(--color-widget_template); }
.type-badge[data-type="header_footer_template"] { background: var(--color-header_footer_template); }
.type-badge[data-type="theme"] { background: var(--color-theme); }
.type-badge[data-type="schema"] { background: var(--color-schema); }
.type-badge[data-type="policy"] { background: var(--color-policy); }
.type-badge[data-type="tenant_override"] { background: var(--color-tenant_override); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-block; padding: 1px 9px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 600;
}
.status-badge.status-draft { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-badge.status-in-review { background: #fef9c3; color: #854d0e; }
.status-badge.status-approved { background: #dcfce7; color: #166534; }
.status-badge.status-active { background: #dbeafe; color: #1e40af; }
.status-badge.status-deprecated { background: #ffedd5; color: #9a3412; }
.status-badge.status-archived { background: #f1f5f9; color: #9ca3af; }

/* ============================================================
   DATA TABLES
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.data-table th {
  background: #f8fafc; font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: #64748b; padding: 10px 12px; text-align: left;
  border-bottom: 2px solid #e2e8f0; cursor: pointer;
}
.data-table th:hover { background: #f1f5f9; }
.data-table td { padding: 10px 12px; font-size: 0.875rem; border-bottom: 1px solid #f1f5f9; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }
.data-table tr.selected td { background: #eef2ff; }

/* ============================================================
   METRICS ROW
   ============================================================ */
.metrics-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.metric-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 18px; min-width: 120px; }
.metric-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.metric-value { font-size: 1.6rem; font-weight: 700; color: #0f172a; margin-top: 2px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 12px; margin-top: 16px; justify-content: center; }
.page-info { font-size: 0.85rem; color: #64748b; }

/* ============================================================
   TABS
   ============================================================ */
.tab-bar { display: flex; gap: 2px; border-bottom: 2px solid #e2e8f0; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px; font-size: 0.875rem; font-weight: 500; color: #64748b;
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  transition: color 0.15s; margin-bottom: -2px;
}
.tab-btn:hover { color: #6366f1; }
.tab-btn.active { color: #6366f1; border-bottom-color: #6366f1; }
.tab-panel { animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-control {
  width: 100%; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 8px 10px; font-size: 0.875rem; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
textarea.form-control { resize: vertical; }
.code-area { font-family: 'Consolas', 'Monaco', monospace; font-size: 0.82rem; background: #f8fafc; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.range-input { width: 100%; accent-color: #6366f1; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; }

/* Add-row form for dynamic tables */
.add-row-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
  padding: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0 0 8px 8px;
  margin-top: -1px;
}
.add-row-form .form-control { flex: 1; min-width: 100px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 0.875rem; margin-bottom: 14px; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal { background: #fff; border-radius: 10px; width: 520px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; }
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #64748b; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 8px; }

/* ============================================================
   DROPDOWN
   ============================================================ */
.new-asset-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 4px); background: #fff;
  border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 200px; z-index: 200;
}
.dropdown-item { display: block; padding: 8px 14px; font-size: 0.875rem; color: #374151; }
.dropdown-item:hover { background: #f1f5f9; color: #6366f1; }

/* ============================================================
   STUDIO LAYOUT (split: sidebar + main)
   ============================================================ */
.studio-layout { display: flex; gap: 16px; min-height: 600px; }
.studio-sidebar {
  width: 220px; min-width: 220px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 12px; flex-shrink: 0;
}
.studio-sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; font-size: 0.875rem; }
.studio-main { flex: 1; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; min-width: 0; }
.asset-list { margin-top: 8px; }
.asset-list-item {
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
  border: 1px solid transparent; margin-bottom: 3px; transition: background 0.1s;
}
.asset-list-item:hover { background: #f1f5f9; }
.asset-list-item.active { background: #eef2ff; border-color: #6366f1; color: #4f46e5; font-weight: 500; }

/* ============================================================
   MISC
   ============================================================ */
.empty-state { text-align: center; padding: 40px 20px; color: #94a3b8; font-size: 0.9rem; }
.hint { color: #64748b; font-size: 0.85rem; margin-bottom: 10px; }
.code-block { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 8px; font-size: 0.82rem; font-family: 'Consolas', monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.collapsible { border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 12px; }
.collapsible summary { padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.collapsible > div, .collapsible > .add-row-form { padding: 12px 14px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.color-swatch { width: 80px; text-align: center; }
.swatch-block { height: 50px; border-radius: 6px; border: 1px solid #e2e8f0; margin-bottom: 4px; }
.swatch-label { font-size: 0.7rem; color: #64748b; word-break: break-all; }
.version-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tenant-active-badge { display: inline-block; background: #dbeafe; color: #1e40af; border-radius: 6px; padding: 5px 12px; font-size: 0.85rem; margin-bottom: 12px; }
.batch-select-list { max-height: 300px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; background: #fff; }
.batch-select-item { display: flex; align-items: center; gap: 8px; padding: 5px; font-size: 0.85rem; }
.release-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.release-form-panel, .release-list-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; }
.asset-header-row { display: flex; justify-content: space-between; align-items: flex-start; }
.asset-header-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.asset-header-actions { display: flex; gap: 8px; }
.asset-version, .asset-domain { font-size: 0.82rem; color: #64748b; }
.checklist { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.checklist-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; padding: 6px 12px; border-radius: 6px; }
.checklist-item.pass { background: #dcfce7; color: #166534; }
.checklist-item.fail { background: #fee2e2; color: #991b1b; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meta-item { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.meta-full { grid-column: span 2; }
.meta-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; font-weight: 600; }
.meta-value { font-size: 0.875rem; color: #1e293b; margin-top: 2px; }
.meta-code { font-family: monospace; font-size: 0.8rem; color: #6366f1; }
.asset-checkbox-list { max-height: 250px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px; }
.asset-checkbox-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 0.85rem; cursor: pointer; border-radius: 4px; }
.asset-checkbox-item:hover { background: #f8fafc; }

/* Flash messages */
#flash-container { padding: 0 24px; }
.flash-message {
  padding: 10px 14px; border-radius: 6px; font-size: 0.875rem; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef9c3; color: #854d0e; }
.flash-info { background: #dbeafe; color: #1e40af; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: inherit; }

/* ── Responsive scaling (Sapience standard breakpoints) ─────────── */

/* Large desktop: cap main content width at 1280px */
@media (min-width: 1440px) {
  .page-content { max-width: 1280px; margin-inline: auto; }
}

/* Tablet: tighten multi-column layouts */
@media (max-width: 1024px) {
  .release-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .studio-layout { flex-direction: column; }
  .studio-sidebar { width: 100%; min-width: unset; }
}

/* Mobile: collapse sidebar, stack and compact */
@media (max-width: 768px) {
  body { overflow-x: hidden; }

  /* Collapse nav sidebar off-screen */
  .sidebar { width: 0; min-width: 0; overflow: hidden; position: fixed; z-index: 200; }
  .main-wrapper { margin-left: 0; }

  .top-header { padding: 8px 12px; }
  .page-content { padding: 14px 12px; }
  #flash-container { padding: 0 12px; }

  /* Asset grid falls to 1 column (600px rule already handles 2-col) */
  .asset-grid { grid-template-columns: repeat(2, 1fr); }

  /* Stack form rows */
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }

  /* Metrics row */
  .metrics-row { gap: 8px; }
  .metric-card { min-width: unset; flex: 1; }
}

/* Extra-small: single-column everything */
@media (max-width: 480px) {
  .page-content { padding: 10px 8px; }
  .asset-grid { grid-template-columns: 1fr; }
  .metrics-row { flex-direction: column; }
  .metric-value { font-size: 1.25rem; }
  .tab-bar { flex-wrap: wrap; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-input, .filter-select { min-width: unset; width: 100%; }
}

/* ── Template Studio: Design System Enhancements ── */

/* Asset cards with lifecycle state styling */
.asset-card {
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  border-left: 3px solid transparent;
}
.asset-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.09);
  transform: translateY(-2px);
}
.asset-card[data-status="draft"]       { border-left-color: #9CA3AF; }
.asset-card[data-status="in_review"]   { border-left-color: #D97706; }
.asset-card[data-status="approved"]    { border-left-color: #0891B2; }
.asset-card[data-status="active"]      { border-left-color: #059669; }
.asset-card[data-status="deprecated"]  { border-left-color: #DC2626; opacity: 0.75; }

/* Lifecycle progress bar */
.lifecycle-bar {
  display: flex; gap: 2px; margin-bottom: 16px;
}
.lifecycle-step {
  flex: 1; height: 4px; border-radius: 2px;
  background: #E2E8F0;
  transition: background 0.3s ease;
}
.lifecycle-step.done    { background: #6366f1; }
.lifecycle-step.current { background: #EC4E20; animation: iqai-pulse-bar 1.5s infinite; }
@keyframes iqai-pulse-bar {
  0%, 100% { opacity: 1; } 50% { opacity: 0.6; }
}

/* Diff view */
.diff-line { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; padding: 2px 8px; border-radius: 2px; }
.diff-add  { background: #ECFDF5; color: #065F46; }
.diff-rem  { background: #FEF2F2; color: #991B1B; text-decoration: line-through; }
.diff-ctx  { color: #64748B; }

/* Version tag */
.version-tag {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
  letter-spacing: 0.02em;
}

/* Editor-style code preview */
.code-preview {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px; line-height: 1.7;
  background: #1E2433;
  color: #E2E8F0;
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
}
.code-preview .code-keyword { color: #93C5FD; }
.code-preview .code-string  { color: #86EFAC; }
.code-preview .code-comment { color: #64748B; font-style: italic; }
