:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-row-hover: #1e293b;
  --bg-row-selected: #2563eb25;
  --border-color: #334155;
  --border-focus: #3b82f6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --color-key: #7dd3fc;
  --color-string: #86efac;
  --color-number: #fde047;
  --color-boolean: #f472b6;
  --color-null: #94a3b8;
  --tree-guide-color: #1e293b;

  --row-height: 28px;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-row-hover: #e2e8f0;
  --bg-row-selected: #3b82f620;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --color-key: #0284c7;
  --color-string: #16a34a;
  --color-number: #d97706;
  --color-boolean: #db2777;
  --color-null: #64748b;
  --tree-guide-color: #cbd5e1;
}

body.light-theme .search-input {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .btn {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn:hover {
  background-color: #f1f5f9;
}

body.light-theme .btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

body.light-theme .btn-primary:hover {
  background-color: #1d4ed8;
}

body.light-theme .modal-content {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .modal-textarea {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .workspace-tab {
  background-color: #e2e8f0;
  color: #475569;
}

body.light-theme .workspace-tab.active {
  background-color: #ffffff;
  color: #0f172a;
  border-top-color: #2563eb;
}

body.light-theme .app-header {
  background-color: #ffffff;
  border-bottom-color: #cbd5e1;
}

body.light-theme .app-breadcrumbs-bar {
  background-color: #f8fafc;
  border-bottom-color: #cbd5e1;
}

body.light-theme .app-status-bar {
  background-color: #ffffff;
  border-top-color: #cbd5e1;
  color: #475569;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Header & Top Bar */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  text-transform: uppercase;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: #475569;
  border-color: #64748b;
}

.btn-primary {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* Status Bar */
.app-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  background: #090d16;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
}

.status-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-item strong {
  color: var(--text-main);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: inherit;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.lang-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
}

/* Status Bar Action Buttons */
.status-bar-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: inherit;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-bar-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-main);
}

/* Legal Modal */
.legal-modal-card {
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-body {
  overflow-y: auto;
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

/* Intermediate Container Hierarchy */
.tree-viewport-wrapper,
#tree-viewport-container,
.workspace-container,
.main-split-view,
.tree-panel,
#tree-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

/* Tree Viewport & Virtual Scroll */
.virtual-scroller-viewport,
.virtual-tree-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: auto;
  outline: none;
  background: var(--bg-primary);
}

.virtual-scroller-viewport:focus-visible,
.virtual-tree-viewport:focus-visible {
  box-shadow: inset 0 0 0 1px var(--border-focus);
}

.virtual-tree-scroll-container {
  position: relative;
  width: 100%;
  min-width: 100%;
}

.virtual-tree-phantom {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  pointer-events: none;
}

.virtual-tree-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}

/* Tree Row */
.tree-row {
  display: flex;
  align-items: center;
  padding: 0 8px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  transition: background-color 0.1s ease;
}

.tree-row * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.tree-row:hover {
  background-color: var(--bg-row-hover);
}

.tree-row.row-selected {
  background-color: var(--bg-row-selected);
  box-shadow: inset 2px 0 0 #3b82f6;
}

.tree-row.nested-root-row {
  background-color: rgba(99, 102, 241, 0.08);
}

/* Indent guides */
.tree-indent-container {
  display: flex;
  height: 100%;
  flex-shrink: 0;
}

.tree-indent-guide {
  width: 20px;
  height: 100%;
  border-right: 1px solid #1e293b;
}

/* Chevron */
.tree-chevron {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 4px;
  border-radius: 3px;
}

.tree-chevron.has-children:hover {
  color: var(--text-main);
  background: var(--bg-tertiary);
}

.tree-chevron.is-leaf {
  cursor: default;
}

/* Key & Value */
.tree-key {
  color: var(--color-key);
  font-weight: 500;
  margin-right: 2px;
}

.tree-colon {
  color: var(--text-dim);
  margin-right: 6px;
}

.tree-value {
  color: var(--text-main);
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 500px;
  display: inline-block;
}

.tree-val-string {
  color: var(--color-string);
}

.tree-val-number {
  color: var(--color-number);
}

.tree-val-boolean {
  color: var(--color-boolean);
}

.tree-val-null, .tree-val-undefined {
  color: var(--color-null);
  font-style: italic;
}

/* Enrichment Badges */
.tree-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 1px 6px;
  margin-left: 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1.3;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}

.tree-badge.clickable-badge:hover {
  filter: brightness(1.28);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.tree-badge.clickable-badge:active {
  transform: translateY(0);
}

.micro-thumbnail {
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Floating Action Toolbar */
.tree-row-actions {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 4px;
}

.tree-row:hover .tree-row-actions {
  display: inline-flex;
}

.pii-unmask-toggle-btn {
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  border-radius: 3px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.pii-unmask-toggle-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

.tree-size-badge {
  margin-left: 6px;
  padding: 1px 5px;
  font-size: 10px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-family: monospace;
}

.action-pin {
  color: #94a3b8;
}

.action-pin.is-pinned {
  color: #fbbf24;
  border-color: #f59e0b;
}

.action-copy-unpacked {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.action-copy-unpacked:hover {
  background: rgba(16, 185, 129, 0.3);
}

.row-action-btn {
  padding: 2px 7px;
  font-size: 11px;
  font-family: inherit;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-main);
  cursor: pointer;
}

.row-action-btn:hover {
  background: #475569;
}

.action-expand {
  background: #4f46e5;
  border-color: #6366f1;
}

.action-expand:hover {
  background: #4338ca;
}

.action-preview {
  background: #0284c7;
  border-color: #0ea5e9;
}

.action-preview:hover {
  background: #0369a1;
}

.row-action-btn.copied {
  background: #10b981;
  border-color: #059669;
}

/* Drawer / Lightbox Modal */
.universal-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.universal-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}

.universal-preview-drawer {
  position: relative;
  width: 650px;
  max-width: 85vw;
  min-width: 360px;
  height: 100%;
  background: #0f172a;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-title {
  font-size: 14px;
  font-weight: 600;
}

.drawer-badge {
  font-size: 11px;
  padding: 2px 6px;
  background: #334155;
  border-radius: 4px;
  color: #94a3b8;
}

.drawer-actions {
  display: flex;
  gap: 8px;
}

.drawer-btn {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-main);
  cursor: pointer;
}

.drawer-btn:hover {
  background: #475569;
}

.drawer-btn.close-btn {
  font-weight: bold;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: var(--bg-primary);
}

/* PDF Preview */
.pdf-preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pdf-iframe {
  flex: 1;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
}

/* Image Preview */
.image-preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-btn {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-main);
  cursor: pointer;
}

.image-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-height: 350px;
}

.zoomable-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.1s ease;
}

.checkered-bg {
  background-color: #1e293b;
  background-image: 
    linear-gradient(45deg, #182234 25%, transparent 25%),
    linear-gradient(-45deg, #182234 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #182234 75%),
    linear-gradient(-45deg, transparent 75%, #182234 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

/* JWT Preview */
.jwt-preview-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jwt-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.status-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.pill-valid {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.pill-expired {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid #ef4444;
}

.jwt-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.code-block {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  color: #f8fafc;
}

.jwt-signature-box {
  background: #090d16;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: #a855f7;
  word-break: break-all;
}

/* Modal for Custom JSON Paste */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 600px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-textarea {
  width: 100%;
  height: 250px;
  background: #090d16;
  color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Search Header Controls */
.search-bar-container {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px 6px;
}

.search-bar-container:focus-within {
  border-color: var(--border-focus);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  width: 170px;
}

.search-count {
  font-size: 10px;
  color: var(--text-muted);
  user-select: none;
  min-width: 45px;
  text-align: center;
}

.search-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 10px;
}

.search-nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-tertiary);
}

.filter-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #475569;
  color: var(--text-main);
}

.filter-pill.active {
  background: #6366f1;
  border-color: #4f46e5;
  color: #ffffff;
  font-weight: 500;
}

/* Breadcrumbs Bar */
.app-breadcrumbs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 16px;
  background: #090d16;
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
  min-height: 28px;
}

.breadcrumbs-trail {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-seg {
  color: var(--color-key);
}

.breadcrumb-sep {
  color: var(--text-dim);
}

.breadcrumbs-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.path-copy-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  color: var(--text-muted);
}

.path-copy-badge:hover {
  background: var(--bg-tertiary);
  color: var(--text-main);
}

/* Highlight Matches */
mark.search-match {
  background: #facc15;
  color: #0f172a;
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 600;
}

.tree-row.search-match-active {
  background: rgba(234, 179, 8, 0.15) !important;
  box-shadow: inset 2px 0 0 #facc15;
}

/* Drag and Drop Overlay */
.drag-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.9);
  border: 3px dashed #6366f1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  animation: fadeIn 0.15s ease;
}

.drag-drop-icon {
  font-size: 48px;
}

.drag-drop-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Media Preview (Audio & Video) */
.audio-player-container,
.video-player-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.media-meta,
.media-format,
.media-resolution,
.media-duration {
  font-size: 12px;
  color: var(--text-muted);
}

.media-meta strong,
.media-format strong {
  color: var(--text-main);
}

.audio-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  align-items: center;
}

.audio-waveform-wrapper {
  width: 100%;
  max-width: 600px;
  height: 120px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.visualizer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.native-media-player {
  width: 100%;
  max-width: 600px;
  border-radius: 6px;
  outline: none;
}

.video-stage {
  width: 100%;
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-stage video {
  max-width: 100%;
  max-height: 520px;
  outline: none;
}

.speed-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.speed-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.speed-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.speed-btn:hover {
  background: #334155;
  color: #fff;
}

.speed-btn.active {
  background: #6366f1;
  color: #fff;
  border-color: #818cf8;
  font-weight: 600;
}

/* Resizable Drawer Handle */
.drawer-resizer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 100;
  background: transparent;
  transition: background 0.15s ease;
}

.drawer-resizer:hover,
.universal-preview-overlay.is-resizing .drawer-resizer {
  background: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.9);
}

/* Drawer Tabs */
.drawer-tabs-wrapper {
  display: flex;
  align-items: center;
}

.drawer-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.drawer-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-tab:hover {
  color: #fff;
}

.drawer-tab.active {
  background: #334155;
  color: #fff;
  font-weight: 600;
}

.drawer-view-panel {
  width: 100%;
  height: 100%;
}

/* Hex Dump Inspector */
.hexdump-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}

.hexdump-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
}

.hexdump-stats {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
}

.hexdump-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.hex-magic-sample {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: rgba(250, 204, 21, 0.35);
  border: 1px solid #facc15;
  border-radius: 2px;
}

.hexdump-content {
  flex: 1;
  background: #050811;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
  color: #cbd5e1;
  user-select: text;
}

.hexdump-row {
  display: flex;
  gap: 12px;
  white-space: pre;
}

.hexdump-offset {
  color: #38bdf8;
  font-weight: 600;
  user-select: none;
}

.hexdump-hex {
  color: #e2e8f0;
}

.hex-byte {
  display: inline-block;
}

.hex-magic {
  background: rgba(250, 204, 21, 0.3);
  color: #fde047;
  font-weight: 700;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(250, 204, 21, 0.4);
}

.hexdump-ascii {
  color: #94a3b8;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 10px;
}

.ascii-char {
  display: inline-block;
}

.ascii-magic {
  color: #fde047;
  font-weight: 700;
  background: rgba(250, 204, 21, 0.3);
  border-radius: 2px;
}

.ascii-dot {
  color: #475569;
}

/* ZIP Explorer */
.zip-explorer-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.zip-table-wrapper {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #090d16;
}

.zip-files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.zip-files-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.zip-files-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.zip-file-name {
  font-family: var(--font-mono);
  font-size: 11px;
}

.zip-method-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.zip-row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.zip-action-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zip-action-btn:hover {
  background: #475569;
}

.zip-extracted-preview {
  margin-top: 8px;
  background: #060913;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 12px;
  max-height: 350px;
  overflow: auto;
}

.zip-extracted-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

.zip-extracted-header h4 {
  font-size: 12px;
  color: #38bdf8;
}

.close-extracted-btn {
  font-size: 10px;
  padding: 2px 6px;
}

/* GZIP Decompressed Stage */
.gzip-preview-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.gzip-decompressed-stage {
  flex: 1;
  overflow: auto;
}

/* CSV Table */
.csv-table-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.csv-table-scroll {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #090d16;
}

.universal-csv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.universal-csv-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.universal-csv-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.csv-row-num {
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 10px;
  user-select: none;
  background: rgba(15, 23, 42, 0.6);
  width: 40px;
}

/* URL Query View */
.url-query-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.url-full-box {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  word-break: break-all;
}

.url-full-box .url-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.url-full-box code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #818cf8;
}

.url-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.url-params-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.url-params-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.param-key code {
  color: #38bdf8;
  font-weight: 600;
}

.param-val code {
  color: #e2e8f0;
  word-break: break-all;
}

/* Multi-Tab Workspace Bar */
.workspace-tabs-bar {
  display: flex;
  align-items: center;
  background: #090d16;
  border-bottom: 1px solid var(--border-color);
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  min-height: 38px;
  max-height: 38px;
  gap: 4px;
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  max-width: 200px;
  position: relative;
  transition: all 0.15s ease;
}

.workspace-tab:hover {
  background: rgba(51, 65, 85, 0.5);
  color: var(--text-main);
}

.workspace-tab.active {
  background: var(--bg-main);
  color: #38bdf8;
  border-color: var(--border-color);
  border-bottom: 1px solid var(--bg-main);
  margin-bottom: -1px;
}

.workspace-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tab-input {
  background: var(--bg-tertiary);
  border: 1px solid #38bdf8;
  color: var(--text-main);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
  outline: none;
  width: 100px;
}

.workspace-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
}

.workspace-tab-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.new-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 4px;
}

.new-tab-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border-style: solid;
}

/* Code Viewer with Line Numbers and Highlighting */
.code-viewer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 8px;
}

.code-viewer-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.code-lang-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

.code-viewer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wrap-toggle-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.code-viewer-content {
  flex: 1;
  overflow: auto;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 0;
}

.code-viewer-content.word-wrap-enabled .code-line-text {
  white-space: pre-wrap;
  word-break: break-all;
}

.code-line-row {
  display: flex;
  min-height: 20px;
}

.code-line-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.code-line-num {
  width: 50px;
  min-width: 50px;
  padding-right: 12px;
  text-align: right;
  color: #475569;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.code-line-text {
  flex: 1;
  padding-left: 12px;
  white-space: pre;
  color: var(--text-main);
}

/* Syntax Highlighting */
.sql-keyword {
  color: #c084fc;
  font-weight: 600;
}

.sql-string {
  color: #34d399;
}

.sql-number {
  color: #fb923c;
}

.code-comment {
  color: #64748b;
  font-style: italic;
}

.trace-error-line {
  color: #f87171;
  font-weight: 700;
}

.trace-path {
  color: #38bdf8;
}

.trace-line-num {
  color: #facc15;
}

/* Deep Unpack Export Modal */
.export-modal-card {
  max-width: 800px;
  width: 90%;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.export-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.export-stat-badge {
  font-size: 11px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.export-help-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.export-preview-textarea {
  flex: 1;
  width: 100%;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px;
  resize: none;
  outline: none;
  white-space: pre;
}

.export-copy-hint {
  font-size: 12px;
  color: #34d399;
  margin-right: auto;
}

/* === Stage 7: Deep Structural Diff Styles === */
.diff-row-added {
  background: rgba(34, 197, 94, 0.08) !important;
  border-left: 3px solid #22c55e !important;
}

.diff-row-added .tree-key {
  color: #4ade80 !important;
}

.diff-row-removed {
  background: rgba(239, 68, 68, 0.08) !important;
  border-left: 3px solid #ef4444 !important;
  opacity: 0.75;
}

.diff-row-removed .tree-key {
  color: #f87171 !important;
  text-decoration: line-through;
}

.diff-row-removed .tree-value {
  color: #f87171 !important;
  text-decoration: line-through;
}

.diff-row-modified {
  background: rgba(234, 179, 8, 0.08) !important;
  border-left: 3px solid #eab308 !important;
}

.diff-row-modified .tree-key {
  color: #facc15 !important;
}

.diff-row-modified .tree-value {
  color: #fde047 !important;
  font-weight: 500;
}

/* Diff Selection Modal */
.diff-modal-card {
  max-width: 600px;
  width: 90%;
}

.diff-selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 20px 0;
}

.diff-select-group {
  display: flex;
  flex-direction: column;
}

.modal-select {
  background: var(--bg-primary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.modal-select:focus {
  border-color: #38bdf8;
}

/* PII Redacted styling */
.pii-redacted-row .tree-value {
  color: #fb7185 !important;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* Codegen in Preview Drawer */
.action-codegen {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.action-codegen:hover {
  background: rgba(56, 189, 248, 0.15) !important;
}

.codegen-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}

.codegen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.codegen-subtabs {
  display: flex;
  gap: 6px;
}

.codegen-subtab {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.codegen-subtab:hover {
  color: var(--text-main);
  border-color: #64748b;
}

.codegen-subtab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 600;
}

.codegen-body {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #090d16;
}

.codegen-pre {
  margin: 0;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre;
}

.codegen-code {
  font-family: inherit;
}

/* --- Stage 9: Live Query Bar --- */
.live-query-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.query-icon {
  font-size: 14px;
  color: #f59e0b;
}

.query-input {
  flex: 1;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-main);
  outline: none;
}

.query-input:focus {
  border-color: var(--primary);
}

.query-meta {
  font-size: 11px;
  margin-left: 8px;
  font-family: var(--font-mono);
}

/* --- Stage 12: Bookmarks Bar --- */
.bookmarks-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 11px;
}

.bookmarks-label {
  font-weight: 600;
  color: #f59e0b;
}

.bookmarks-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bookmark-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.bookmark-chip:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

.chip-remove {
  font-weight: bold;
  color: #94a3b8;
  margin-left: 2px;
}

.chip-remove:hover {
  color: #ef4444;
}

/* --- Stage 12: Command Palette --- */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
}

.command-palette-card {
  width: 580px;
  max-width: 90vw;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.command-palette-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
}

.command-palette-icon {
  font-size: 16px;
  color: var(--text-muted);
}

.command-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}

.command-palette-esc {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
}

.command-palette-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.command-palette-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  gap: 12px;
  transition: background 0.1s ease;
}

.command-palette-item:hover,
.command-palette-item.selected {
  background: var(--bg-secondary);
}

.cmd-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.cmd-info {
  flex: 1;
}

.cmd-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.cmd-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.cmd-category {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
}

.cmd-shortcut {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--primary);
  font-family: var(--font-mono);
}

.command-palette-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* --- App Toast Notification --- */
.app-notification-toast {
  position: fixed;
  bottom: 32px;
  right: 24px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideToastIn 0.2s ease-out;
}

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

/* === JSON Validator & Auto-Repair Studio === */
.json-validator-modal-card {
  max-width: 1200px;
  width: 95%;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

.json-validator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.json-validator-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.json-validator-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.json-validator-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.json-validator-badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.json-validator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
}

.json-validator-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: 0;
  overflow: hidden;
}

.json-editor-pane {
  display: flex;
  position: relative;
  border-right: 1px solid var(--border-color);
  background: #090d16;
  overflow: hidden;
}

.json-editor-gutter {
  width: 46px;
  padding: 12px 6px;
  background: rgba(15, 23, 42, 0.5);
  border-right: 1px solid var(--border-color);
  user-select: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  color: #64748b;
  text-align: right;
  overflow: hidden;
}

.gutter-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  height: 20px;
}

.gutter-line.has-error {
  color: #f87171;
  font-weight: bold;
}

.json-editor-textarea {
  flex: 1;
  background: transparent;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  padding: 12px;
  border: none;
  outline: none;
  resize: none;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.json-diagnostics-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  overflow: hidden;
}

.json-diagnostics-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.json-errors-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.json-error-card {
  background: #090d16;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.json-error-card:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: #ef4444;
}

.json-error-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.json-error-loc {
  font-weight: 600;
  color: #f87171;
}

.json-error-code {
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 4px;
  color: #fca5a5;
  font-family: var(--font-mono);
}

.json-error-msg {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.4;
}

.json-error-snippet {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 4px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  overflow-x: auto;
  white-space: pre;
}

.json-error-pointer {
  color: #ef4444;
  font-weight: bold;
}

.json-error-fix-btn {
  align-self: flex-start;
  padding: 3px 8px;
  font-size: 11px;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.json-error-fix-btn:hover {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.json-fixes-applied-card {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.json-fixes-applied-title {
  font-weight: 600;
  color: #4ade80;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.json-fixes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #cbd5e1;
}

.json-fixes-list li::before {
  content: '✓ ';
  color: #4ade80;
  font-weight: bold;
}



