/* ============================================================
   JOx IDE — VS Code Dark Theme
   Complete isolated styling for the JOx code editor.
   All classes prefixed with jox- to avoid JaxsonOS conflicts.
   ============================================================ */

/* ── CSS Variables (Theming) ─────────────────────────────── */
.jox-ide {
  --jox-bg: #1e1e1e;
  --jox-sidebar-bg: #252526;
  --jox-activitybar-bg: #333333;
  --jox-titlebar-bg: #323233;
  --jox-statusbar-bg: #007acc;
  --jox-tab-active-bg: #1e1e1e;
  --jox-tab-inactive-bg: #2d2d2d;
  --jox-tab-border: #252526;
  --jox-border: #252526;
  --jox-text: #cccccc;
  --jox-text-dim: #858585;
  --jox-accent: #007acc;
  --jox-hover: rgba(255, 255, 255, 0.1);
  --jox-selection: #264f78;
  --jox-context-bg: #3c3c3c;
  --jox-context-hover: #094771;
  --jox-panel-border: #007acc;
  --jox-input-bg: #3c3c3c;
  --jox-input-border: #007acc;
  --jox-badge-bg: #007acc;
  --jox-scrollbar-thumb: #424242;
  --jox-scrollbar-thumb-hover: #4f4f4f;
  --jox-list-hover: rgba(255, 255, 255, 0.05);
  --jox-list-active: #37373d;
  --jox-list-focus: #062f4a;
  --jox-editor-line-highlight: #2a2d2e;
  --jox-menu-separator: #454545;
  --jox-font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Ubuntu', 'Droid Sans', sans-serif;
  --jox-mono-font: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
  --jox-font-size: 13px;
  --jox-titlebar-height: 30px;
  --jox-tab-height: 35px;
  --jox-statusbar-height: 22px;
  --jox-breadcrumb-height: 22px;
  --jox-activitybar-width: 48px;
  --jox-sidebar-width: 240px;
}


/* ── Root Container Reset ────────────────────────────────── */
.jox-ide {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--jox-bg);
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: var(--jox-font-size);
  line-height: 1.4;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  text-align: left;
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-indent: 0;
  font-style: normal;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.jox-ide *,
.jox-ide *::before,
.jox-ide *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* ── Global Scrollbar Styling ────────────────────────────── */
.jox-ide ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.jox-ide ::-webkit-scrollbar-track {
  background: transparent;
}

.jox-ide ::-webkit-scrollbar-thumb {
  background: var(--jox-scrollbar-thumb);
  border-radius: 0;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.jox-ide ::-webkit-scrollbar-thumb:hover {
  background: var(--jox-scrollbar-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.jox-ide ::-webkit-scrollbar-corner {
  background: transparent;
}


/* ============================================================
   TITLE BAR
   ============================================================ */
.jox-toolbar {
  display: flex;
  align-items: center;
  height: var(--jox-titlebar-height);
  background: var(--jox-titlebar-bg);
  border-bottom: 1px solid var(--jox-border);
  padding: 0;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-app-region: drag;
  position: relative;
  z-index: 100;
}

.jox-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0;
  -webkit-app-region: no-drag;
  padding: 0 4px;
}

.jox-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 8px;
  background: transparent;
  border: none;
  color: var(--jox-text-dim);
  font-family: var(--jox-font-family);
  font-size: 13px;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
  line-height: 1;
  height: 100%;
  outline: none;
  text-decoration: none;
  transition: none;
}

.jox-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--jox-text);
}

.jox-toolbar-btn:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.jox-toolbar-btn i {
  font-size: 11px;
  pointer-events: none;
}

.jox-toolbar-title {
  flex: 1;
  text-align: center;
  color: #999999;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  font-weight: 400;
}

.jox-toolbar-spacer {
  flex: 1;
}

.jox-toolbar-window-controls {
  display: flex;
  align-items: center;
  height: 100%;
  -webkit-app-region: no-drag;
}

.jox-toolbar-window-btn {
  width: 46px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  font-size: 14px;
  outline: none;
  transition: none;
}

.jox-toolbar-window-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--jox-text);
}

.jox-toolbar-window-btn.jox-close:hover {
  background: #e81123;
  color: #ffffff;
}


/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.jox-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}


/* ============================================================
   ACTIVITY BAR (Left Icon Strip)
   ============================================================ */
.jox-activity-bar {
  width: var(--jox-activitybar-width);
  min-width: var(--jox-activitybar-width);
  max-width: var(--jox-activitybar-width);
  background: var(--jox-activitybar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0;
  flex-shrink: 0;
  border-right: 1px solid var(--jox-border);
  user-select: none;
  z-index: 10;
  overflow: hidden;
}

.jox-activity-btn {
  width: var(--jox-activitybar-width);
  height: var(--jox-activitybar-width);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jox-text-dim);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 22px;
  position: relative;
  transition: color 0.1s ease;
  outline: none;
  text-decoration: none;
  font-family: inherit;
}

.jox-activity-btn:hover {
  color: var(--jox-text);
}

.jox-activity-btn.active {
  color: #ffffff;
}

.jox-activity-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
}

.jox-activity-btn i {
  pointer-events: none;
  font-size: inherit;
}

.jox-activity-bar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0;
}

.jox-activity-badge {
  position: absolute;
  top: 8px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--jox-badge-bg);
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}


/* ============================================================
   SIDEBAR
   ============================================================ */
.jox-sidebar {
  width: var(--jox-sidebar-width);
  min-width: 160px;
  background: var(--jox-sidebar-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--jox-bg);
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
  position: relative;
}

.jox-sidebar.hidden {
  display: none;
}

.jox-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 20px;
  height: var(--jox-tab-height);
  min-height: var(--jox-tab-height);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bbbbbb;
  font-weight: 700;
  user-select: none;
  flex-shrink: 0;
}

.jox-sidebar-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.1s;
}

.jox-sidebar-header:hover .jox-sidebar-actions {
  opacity: 1;
}

.jox-sidebar-action {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #bbbbbb;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: none;
}

.jox-sidebar-action:hover {
  background: var(--jox-hover);
  color: #ffffff;
}

.jox-sidebar-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.jox-sidebar-section-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bbbbbb;
  font-weight: 700;
  cursor: pointer;
  background: var(--jox-sidebar-bg);
  border: none;
  outline: none;
  user-select: none;
  flex-shrink: 0;
}

.jox-sidebar-section-header:hover {
  background: var(--jox-hover);
}

.jox-sidebar-section-header i {
  font-size: 10px;
  transition: transform 0.1s;
}

.jox-sidebar-section-header.collapsed i {
  transform: rotate(-90deg);
}

.jox-sidebar-section-content {
  flex: 1;
  overflow: hidden;
}

.jox-sidebar-section-content.collapsed {
  display: none;
}


/* ============================================================
   FILE TREE
   ============================================================ */
.jox-file-tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 8px 0;
}

.jox-file-tree::-webkit-scrollbar {
  width: 6px;
}

.jox-file-tree::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0;
}

.jox-file-tree::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.jox-tree-item {
  display: flex;
  align-items: center;
  padding: 2px 8px 2px 16px;
  cursor: pointer;
  user-select: none;
  gap: 6px;
  font-size: 13px;
  color: var(--jox-text);
  position: relative;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  outline: none;
  text-decoration: none;
}

.jox-tree-item:hover {
  background: var(--jox-list-hover);
}

.jox-tree-item.active {
  background: var(--jox-list-active);
}

.jox-tree-item.focused {
  background: var(--jox-list-focus);
  outline: 1px solid var(--jox-accent);
  outline-offset: -1px;
}

.jox-tree-item.folder {
  font-weight: 400;
}

.jox-tree-item i {
  font-size: 14px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.jox-tree-item .fa-chevron-right,
.jox-tree-item .fa-chevron-down {
  font-size: 10px;
  width: 10px;
  color: var(--jox-text);
  opacity: 0.7;
}

.jox-tree-item .fa-folder,
.jox-tree-item .fa-folder-open {
  color: #dcb67a;
}

.jox-tree-item .jox-file-icon-html {
  color: #e44d26;
}

.jox-tree-item .jox-file-icon-css {
  color: #264de4;
}

.jox-tree-item .jox-file-icon-js {
  color: #f7df1e;
}

.jox-tree-item .jox-file-icon-ts {
  color: #3178c6;
}

.jox-tree-item .jox-file-icon-json {
  color: #5b9bd5;
}

.jox-tree-item .jox-file-icon-md {
  color: #519aba;
}

.jox-tree-item .jox-file-icon-py {
  color: #3572a5;
}

.jox-tree-item .jox-file-icon-svg {
  color: #ffb13b;
}

.jox-tree-item .jox-file-icon-img {
  color: #a074c4;
}

.jox-tree-item .jox-file-icon-default {
  color: var(--jox-text-dim);
}

.jox-tree-item .jox-file-icon-git {
  color: #f05033;
}

.jox-tree-item .jox-file-icon-config {
  color: #6d8086;
}

.jox-tree-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: inherit;
}

.jox-tree-item-actions {
  display: none;
  gap: 2px;
  align-items: center;
}

.jox-tree-item:hover .jox-tree-item-actions {
  display: flex;
}

.jox-tree-item-action {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 3px;
  font-size: 10px;
  outline: none;
  transition: none;
}

.jox-tree-item-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.jox-tree-children {
  padding-left: 12px;
}

.jox-tree-indent {
  display: inline-block;
  width: 16px;
  flex-shrink: 0;
}

.jox-tree-indent-guide {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}


/* ============================================================
   NEW FILE INPUT (inline in file tree)
   ============================================================ */
.jox-new-file-input {
  width: calc(100% - 24px);
  margin: 2px 12px;
  padding: 2px 6px;
  background: var(--jox-input-bg);
  border: 1px solid var(--jox-input-border);
  border-radius: 2px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 12px;
  outline: none;
  line-height: 18px;
  height: 24px;
}

.jox-new-file-input:focus {
  border-color: var(--jox-input-border);
  box-shadow: 0 0 0 1px var(--jox-input-border);
}

.jox-new-file-input::placeholder {
  color: var(--jox-text-dim);
}


/* ============================================================
   CENTER AREA (Editor + Panels)
   ============================================================ */
.jox-center {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: var(--jox-bg);
  position: relative;
}


/* ============================================================
   EDITOR AREA
   ============================================================ */
.jox-editor-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100px;
  overflow: hidden;
  background: var(--jox-bg);
}


/* ── Editor Tabs ─────────────────────────────────────────── */
.jox-tabs {
  display: flex;
  align-items: stretch;
  background: var(--jox-tab-border);
  height: var(--jox-tab-height);
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  border-bottom: 1px solid var(--jox-bg);
  user-select: none;
}

.jox-tabs::-webkit-scrollbar {
  height: 3px;
}

.jox-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0;
}

.jox-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 100%;
  cursor: pointer;
  border-right: 1px solid var(--jox-bg);
  font-size: 12px;
  color: var(--jox-text-dim);
  white-space: nowrap;
  user-select: none;
  min-width: 0;
  max-width: 200px;
  flex-shrink: 0;
  background: var(--jox-tab-inactive-bg);
  position: relative;
  outline: none;
  text-decoration: none;
  font-family: var(--jox-font-family);
}

.jox-tab:hover {
  background: #2a2d2e;
}

.jox-tab.active {
  background: var(--jox-tab-active-bg);
  color: #ffffff;
  border-bottom: 1px solid var(--jox-tab-active-bg);
  margin-bottom: -1px;
}

.jox-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--jox-accent);
}

.jox-tab-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  line-height: 1;
}

.jox-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.jox-tab-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  outline: none;
  transition: none;
}

.jox-tab:hover .jox-tab-close,
.jox-tab.active .jox-tab-close {
  opacity: 1;
}

.jox-tab-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.jox-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c3c3c3;
  display: none;
  flex-shrink: 0;
}

.jox-tab.modified .jox-tab-dot {
  display: block;
}

.jox-tab.modified .jox-tab-close {
  display: none;
}

.jox-tab.modified:hover .jox-tab-dot {
  display: none;
}

.jox-tab.modified:hover .jox-tab-close {
  display: flex;
  opacity: 1;
}

.jox-tabs-overflow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--jox-text-dim);
  font-size: 14px;
  background: var(--jox-tab-border);
  border: none;
  outline: none;
}

.jox-tabs-overflow:hover {
  background: var(--jox-hover);
  color: var(--jox-text);
}


/* ── Breadcrumb Bar ──────────────────────────────────────── */
.jox-breadcrumb {
  display: flex;
  align-items: center;
  height: var(--jox-breadcrumb-height);
  padding: 0 12px;
  background: var(--jox-bg);
  border-bottom: 1px solid #2d2d2d;
  font-size: 11px;
  color: var(--jox-text-dim);
  gap: 2px;
  flex-shrink: 0;
  user-select: none;
  overflow: hidden;
}

.jox-breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1px 4px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--jox-text-dim);
  outline: none;
}

.jox-breadcrumb-item:hover {
  background: var(--jox-hover);
  color: var(--jox-text);
}

.jox-breadcrumb-item.active {
  color: var(--jox-text);
}

.jox-breadcrumb span {
  color: var(--jox-text);
}

.jox-breadcrumb-separator {
  font-size: 9px;
  color: #666666;
  margin: 0 1px;
}

.jox-breadcrumb i {
  font-size: 8px;
  color: #666666;
}


/* ── Editor Container ────────────────────────────────────── */
.jox-editor-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--jox-bg);
}

.jox-editor-container .monaco-editor {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}


/* ============================================================
   WELCOME TAB
   ============================================================ */
.jox-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  gap: 20px;
  color: #555555;
  background: var(--jox-bg);
  padding: 40px;
  overflow-y: auto;
}

.jox-welcome-logo {
  font-size: 80px;
  color: var(--jox-accent);
  opacity: 0.25;
  line-height: 1;
}

.jox-welcome h2 {
  font-size: 24px;
  font-weight: 200;
  color: var(--jox-text);
  margin: 0;
  letter-spacing: -0.5px;
}

.jox-welcome-subtitle {
  font-size: 14px;
  color: var(--jox-text-dim);
  font-weight: 300;
  margin-top: -8px;
}

.jox-welcome-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
  width: 100%;
}

.jox-welcome-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--jox-text);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jox-welcome-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  margin-top: 12px;
}

.jox-welcome-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--jox-accent);
  text-decoration: none;
  outline: none;
  border: none;
  background: none;
  font-family: var(--jox-font-family);
}

.jox-welcome-shortcut:hover {
  background: rgba(0, 122, 204, 0.1);
  color: #3794ff;
}

.jox-welcome-shortcut i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.jox-welcome-shortcut-key {
  margin-left: auto;
  font-size: 11px;
  color: var(--jox-text-dim);
  font-family: var(--jox-font-family);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.jox-welcome-recent {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jox-welcome-recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--jox-accent);
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 4px;
}

.jox-welcome-recent-item:hover {
  background: rgba(0, 122, 204, 0.1);
}

.jox-welcome-recent-item span {
  color: var(--jox-text-dim);
  font-size: 12px;
  margin-left: 8px;
}


/* ============================================================
   RESIZERS
   ============================================================ */
.jox-h-resize {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  flex-shrink: 0;
  z-index: 5;
  position: relative;
  transition: background 0.15s ease;
}

.jox-h-resize:hover,
.jox-h-resize.active {
  background: var(--jox-accent);
}

.jox-h-resize::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2px;
  right: -2px;
}

.jox-v-resize {
  height: 4px;
  cursor: row-resize;
  background: transparent;
  flex-shrink: 0;
  z-index: 5;
  position: relative;
  transition: background 0.15s ease;
}

.jox-v-resize:hover,
.jox-v-resize.active {
  background: var(--jox-accent);
}

.jox-v-resize::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  bottom: -2px;
}


/* ============================================================
   BOTTOM PANEL (Terminal, Problems, Output, Debug Console)
   ============================================================ */
.jox-panel-area {
  height: 250px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  background: var(--jox-bg);
  border-top: 1px solid #414141;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.jox-panel-area.hidden {
  display: none;
}

.jox-panel-tabs {
  display: flex;
  align-items: center;
  height: var(--jox-tab-height);
  background: var(--jox-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 10px;
  flex-shrink: 0;
  user-select: none;
}

.jox-panel-tab {
  padding: 6px 12px;
  cursor: pointer;
  color: var(--jox-text-dim);
  font-family: var(--jox-font-family);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
  user-select: none;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  outline: none;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.jox-panel-tab:hover {
  color: var(--jox-text);
}

.jox-panel-tab.active {
  color: #ffffff;
  border-bottom-color: var(--jox-panel-border);
}

.jox-panel-tab-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--jox-badge-bg);
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  line-height: 1;
}

.jox-panel-actions {
  margin-left: auto;
  display: flex;
  gap: 2px;
  align-items: center;
}

.jox-panel-action-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: none;
}

.jox-panel-action-btn:hover {
  background: var(--jox-hover);
  color: #ffffff;
}

.jox-panel-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}


/* ── Terminal ────────────────────────────────────────────── */
.jox-terminal-container {
  flex: 1;
  overflow: hidden;
  padding: 4px 0 0 8px;
  background: var(--jox-bg);
  position: relative;
}

.jox-terminal-container .xterm {
  padding: 0;
}

.jox-terminal-container .xterm-viewport {
  overflow-y: auto;
}

.jox-terminal-container .xterm-viewport::-webkit-scrollbar {
  width: 10px;
}

.jox-terminal-container .xterm-viewport::-webkit-scrollbar-thumb {
  background: var(--jox-scrollbar-thumb);
}

.jox-terminal-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #d4d4d4;
  font-family: var(--jox-mono-font);
  font-size: 13px;
  outline: none;
  padding: 4px 8px;
  line-height: 1.5;
}

.jox-terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  font-family: var(--jox-mono-font);
  font-size: 13px;
  color: #d4d4d4;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.jox-terminal-line {
  line-height: 1.5;
}

.jox-terminal-prompt {
  color: #6a9955;
}

.jox-terminal-error {
  color: #f44747;
}

.jox-terminal-warning {
  color: #cca700;
}

.jox-terminal-info {
  color: #3794ff;
}


/* ── Problems Panel ──────────────────────────────────────── */
.jox-problems-container {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.jox-problem-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 16px;
  font-size: 12px;
  cursor: pointer;
  color: var(--jox-text);
}

.jox-problem-item:hover {
  background: var(--jox-list-hover);
}

.jox-problem-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  margin-top: 2px;
}

.jox-problem-icon.error {
  color: #f44747;
}

.jox-problem-icon.warning {
  color: #cca700;
}

.jox-problem-icon.info {
  color: #3794ff;
}

.jox-problem-message {
  flex: 1;
}

.jox-problem-source {
  color: var(--jox-text-dim);
  font-size: 11px;
  margin-left: 8px;
}


/* ============================================================
   PREVIEW PANEL
   ============================================================ */
.jox-preview-panel {
  width: 450px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  background: var(--jox-bg);
  border-left: 1px solid #414141;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.jox-preview-panel.hidden {
  display: none;
}

.jox-preview-header {
  display: flex;
  align-items: center;
  height: var(--jox-tab-height);
  background: var(--jox-sidebar-bg);
  border-bottom: 1px solid var(--jox-bg);
  padding: 0 8px;
  flex-shrink: 0;
  gap: 6px;
  user-select: none;
}

.jox-preview-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bbbbbb;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.jox-preview-url {
  flex: 1;
  height: 24px;
  background: var(--jox-input-bg);
  border: 1px solid #555555;
  border-radius: 4px;
  color: var(--jox-text);
  padding: 0 8px;
  font-size: 12px;
  font-family: var(--jox-mono-font);
  outline: none;
  min-width: 0;
}

.jox-preview-url:focus {
  border-color: var(--jox-input-border);
  box-shadow: 0 0 0 1px var(--jox-input-border);
}

.jox-preview-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  flex-shrink: 0;
  transition: none;
}

.jox-preview-btn:hover {
  background: var(--jox-hover);
  color: #ffffff;
}

.jox-preview-frame {
  flex: 1;
  border: none;
  background: #ffffff;
  width: 100%;
}

.jox-preview-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--jox-text-dim);
  gap: 12px;
}

.jox-preview-placeholder i {
  font-size: 48px;
  opacity: 0.3;
}


/* ============================================================
   STATUS BAR
   ============================================================ */
.jox-statusbar {
  height: var(--jox-statusbar-height);
  min-height: var(--jox-statusbar-height);
  max-height: var(--jox-statusbar-height);
  background: var(--jox-statusbar-bg);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: #ffffff;
  flex-shrink: 0;
  gap: 0;
  user-select: none;
  z-index: 100;
  overflow: hidden;
}

.jox-statusbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0 6px;
  height: 100%;
  white-space: nowrap;
  font-size: 12px;
  color: #ffffff;
  background: none;
  border: none;
  outline: none;
  font-family: var(--jox-font-family);
  text-decoration: none;
}

.jox-statusbar-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.jox-statusbar-item i {
  font-size: 12px;
}

.jox-statusbar-right {
  margin-left: auto;
  display: flex;
  gap: 0;
  align-items: center;
  height: 100%;
}

.jox-statusbar-separator {
  width: 1px;
  height: 60%;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

.jox-statusbar.no-project {
  background: #68217a;
}

.jox-statusbar.debugging {
  background: #cc6633;
}


/* ============================================================
   CONTEXT MENU
   ============================================================ */
.jox-context-menu {
  position: fixed;
  background: var(--jox-context-bg);
  border: 1px solid #454545;
  border-radius: 5px;
  padding: 4px 0;
  min-width: 200px;
  max-width: 320px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.36), 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  font-size: 12px;
  font-family: var(--jox-font-family);
  color: var(--jox-text);
  user-select: none;
  animation: jox-context-fadein 0.08s ease-out;
}

@keyframes jox-context-fadein {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.jox-context-menu-item {
  padding: 4px 28px 4px 8px;
  cursor: pointer;
  color: var(--jox-text);
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  outline: none;
  position: relative;
  border-radius: 0;
}

.jox-context-menu-item:hover,
.jox-context-menu-item.focused {
  background: var(--jox-context-hover);
  color: #ffffff;
}

.jox-context-menu-item.disabled {
  color: var(--jox-text-dim);
  cursor: default;
  pointer-events: none;
}

.jox-context-menu-item i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  flex-shrink: 0;
}

.jox-context-menu-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jox-context-menu-shortcut {
  margin-left: 20px;
  color: var(--jox-text-dim);
  font-size: 11px;
  white-space: nowrap;
}

.jox-context-menu-submenu-arrow {
  margin-left: auto;
  font-size: 10px;
  color: var(--jox-text-dim);
}

.jox-context-menu-separator {
  height: 1px;
  background: #454545;
  margin: 4px 8px;
}

.jox-context-menu-group-label {
  padding: 4px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--jox-text-dim);
}


/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.jox-command-palette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 9000;
  display: flex;
  justify-content: center;
  padding-top: 0;
  animation: jox-overlay-fadein 0.1s ease;
}

@keyframes jox-overlay-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.jox-command-palette {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90%;
  background: var(--jox-sidebar-bg);
  border: 1px solid #454545;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  max-height: 400px;
  overflow: hidden;
  animation: jox-palette-slidein 0.12s ease-out;
}

@keyframes jox-palette-slidein {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.jox-command-palette-input-wrapper {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.jox-command-palette-input-wrapper i {
  color: var(--jox-text-dim);
  font-size: 14px;
  flex-shrink: 0;
}

.jox-command-palette-input {
  flex: 1;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 14px;
  padding: 6px 10px;
  outline: none;
  line-height: 1.4;
}

.jox-command-palette-input:focus {
  border-color: var(--jox-input-border);
}

.jox-command-palette-input::placeholder {
  color: var(--jox-text-dim);
}

.jox-command-palette-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.jox-command-palette-list::-webkit-scrollbar {
  width: 6px;
}

.jox-command-palette-list::-webkit-scrollbar-thumb {
  background: var(--jox-scrollbar-thumb);
}

.jox-command-palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  cursor: pointer;
  color: var(--jox-text);
  font-size: 13px;
  outline: none;
}

.jox-command-palette-item:hover,
.jox-command-palette-item.active {
  background: var(--jox-context-hover);
  color: #ffffff;
}

.jox-command-palette-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--jox-text-dim);
  flex-shrink: 0;
}

.jox-command-palette-item:hover i,
.jox-command-palette-item.active i {
  color: #ffffff;
}

.jox-command-palette-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jox-command-palette-item-shortcut {
  font-size: 11px;
  color: var(--jox-text-dim);
  white-space: nowrap;
}

.jox-command-palette-item-category {
  font-size: 11px;
  color: var(--jox-text-dim);
  margin-right: 4px;
}

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

.jox-command-palette-header {
  padding: 4px 16px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--jox-text-dim);
}


/* ============================================================
   QUICK OPEN (File Picker)
   ============================================================ */
.jox-quick-open {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90%;
  background: var(--jox-sidebar-bg);
  border: 1px solid #454545;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  max-height: 400px;
  overflow: hidden;
}

.jox-quick-open-input {
  flex: 0 0 auto;
  background: var(--jox-input-bg);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
}

.jox-quick-open-input:focus {
  border-bottom-color: var(--jox-accent);
}

.jox-quick-open-input::placeholder {
  color: var(--jox-text-dim);
}

.jox-quick-open-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.jox-quick-open-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px;
  cursor: pointer;
  color: var(--jox-text);
  font-size: 13px;
}

.jox-quick-open-item:hover,
.jox-quick-open-item.active {
  background: var(--jox-context-hover);
  color: #ffffff;
}

.jox-quick-open-item i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.jox-quick-open-item-path {
  font-size: 11px;
  color: var(--jox-text-dim);
  margin-left: auto;
}


/* ============================================================
   FIND WIDGET (in-editor search)
   ============================================================ */
.jox-find-widget {
  position: absolute;
  top: 0;
  right: 30px;
  width: 420px;
  background: var(--jox-sidebar-bg);
  border: 1px solid #454545;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
}

.jox-find-widget.hidden {
  display: none;
}

.jox-find-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.jox-find-input {
  flex: 1;
  height: 26px;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 13px;
  padding: 0 8px;
  outline: none;
  min-width: 0;
}

.jox-find-input:focus {
  border-color: var(--jox-input-border);
}

.jox-find-input::placeholder {
  color: var(--jox-text-dim);
}

.jox-find-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 3px;
  font-size: 12px;
  outline: none;
  flex-shrink: 0;
}

.jox-find-btn:hover {
  background: var(--jox-hover);
  color: var(--jox-text);
}

.jox-find-btn.active {
  background: rgba(0, 122, 204, 0.3);
  color: #ffffff;
}

.jox-find-count {
  font-size: 11px;
  color: var(--jox-text-dim);
  white-space: nowrap;
  padding: 0 6px;
}

.jox-find-replace-input {
  flex: 1;
  height: 26px;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 13px;
  padding: 0 8px;
  outline: none;
  min-width: 0;
}

.jox-find-replace-input:focus {
  border-color: var(--jox-input-border);
}


/* ============================================================
   NOTIFICATIONS / TOASTS
   ============================================================ */
.jox-notifications {
  position: absolute;
  bottom: calc(var(--jox-statusbar-height) + 8px);
  right: 12px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  z-index: 8000;
  max-width: 400px;
}

.jox-notification {
  background: var(--jox-sidebar-bg);
  border: 1px solid #454545;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--jox-text);
  animation: jox-notification-slidein 0.2s ease-out;
}

@keyframes jox-notification-slidein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jox-notification-icon {
  flex-shrink: 0;
  font-size: 16px;
  margin-top: 1px;
}

.jox-notification-icon.info {
  color: var(--jox-accent);
}

.jox-notification-icon.warning {
  color: #cca700;
}

.jox-notification-icon.error {
  color: #f44747;
}

.jox-notification-body {
  flex: 1;
  min-width: 0;
}

.jox-notification-message {
  font-size: 13px;
  line-height: 1.4;
}

.jox-notification-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.jox-notification-action-btn {
  padding: 2px 10px;
  border: 1px solid var(--jox-accent);
  background: none;
  color: var(--jox-text);
  cursor: pointer;
  border-radius: 2px;
  font-size: 12px;
  font-family: var(--jox-font-family);
  outline: none;
}

.jox-notification-action-btn:hover {
  background: var(--jox-accent);
  color: #ffffff;
}

.jox-notification-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 3px;
  font-size: 12px;
  flex-shrink: 0;
  outline: none;
}

.jox-notification-close:hover {
  background: var(--jox-hover);
  color: #ffffff;
}


/* ============================================================
   DIALOG / MODAL
   ============================================================ */
.jox-dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 8500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jox-dialog {
  background: var(--jox-sidebar-bg);
  border: 1px solid #454545;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 90%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jox-dialog-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--jox-text);
}

.jox-dialog-message {
  font-size: 13px;
  color: var(--jox-text);
  line-height: 1.5;
}

.jox-dialog-input {
  width: 100%;
  height: 30px;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 13px;
  padding: 0 10px;
  outline: none;
}

.jox-dialog-input:focus {
  border-color: var(--jox-input-border);
}

.jox-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.jox-dialog-btn {
  padding: 5px 14px;
  border-radius: 2px;
  font-size: 13px;
  font-family: var(--jox-font-family);
  cursor: pointer;
  outline: none;
  border: none;
}

.jox-dialog-btn.primary {
  background: var(--jox-accent);
  color: #ffffff;
}

.jox-dialog-btn.primary:hover {
  background: #1a8cdb;
}

.jox-dialog-btn.secondary {
  background: transparent;
  color: var(--jox-text);
  border: 1px solid #555555;
}

.jox-dialog-btn.secondary:hover {
  background: var(--jox-hover);
}


/* ============================================================
   TOOLTIP
   ============================================================ */
.jox-tooltip {
  position: fixed;
  background: var(--jox-sidebar-bg);
  border: 1px solid #454545;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--jox-text);
  z-index: 11000;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: jox-tooltip-fadein 0.1s ease;
}

@keyframes jox-tooltip-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ============================================================
   EDITOR GROUP (Split Editors)
   ============================================================ */
.jox-editor-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--jox-border);
}

.jox-editor-group:last-child {
  border-right: none;
}

.jox-editor-groups {
  display: flex;
  flex: 1;
  overflow: hidden;
}


/* ============================================================
   MINIMAP (Monaco handles rendering, we style the container)
   ============================================================ */
.jox-ide .minimap {
  right: 0;
}

.jox-ide .minimap-slider {
  background: rgba(100, 100, 100, 0.2);
}

.jox-ide .minimap-slider:hover {
  background: rgba(100, 100, 100, 0.3);
}


/* ============================================================
   DROPDOWN / SELECT
   ============================================================ */
.jox-dropdown {
  position: relative;
  display: inline-flex;
}

.jox-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--jox-input-bg);
  border: 1px solid #555555;
  border-radius: 3px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.jox-dropdown-trigger:focus {
  border-color: var(--jox-input-border);
}

.jox-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  background: var(--jox-context-bg);
  border: 1px solid #454545;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  padding: 4px 0;
  max-height: 200px;
  overflow-y: auto;
}

.jox-dropdown-item {
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--jox-text);
  white-space: nowrap;
}

.jox-dropdown-item:hover {
  background: var(--jox-context-hover);
  color: #ffffff;
}

.jox-dropdown-item.active {
  background: rgba(0, 122, 204, 0.2);
}


/* ============================================================
   SETTINGS / INPUTS
   ============================================================ */
.jox-input {
  height: 26px;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 13px;
  padding: 0 8px;
  outline: none;
}

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

.jox-input::placeholder {
  color: var(--jox-text-dim);
}

.jox-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--jox-accent);
  cursor: pointer;
}

.jox-select {
  height: 26px;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 13px;
  padding: 0 8px;
  outline: none;
  cursor: pointer;
}

.jox-select:focus {
  border-color: var(--jox-input-border);
}


/* ============================================================
   BUTTON STYLES
   ============================================================ */
.jox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  border: none;
  border-radius: 2px;
  font-family: var(--jox-font-family);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  user-select: none;
}

.jox-btn-primary {
  background: var(--jox-accent);
  color: #ffffff;
}

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

.jox-btn-secondary {
  background: transparent;
  color: var(--jox-text);
  border: 1px solid #555555;
}

.jox-btn-secondary:hover {
  background: var(--jox-hover);
}

.jox-btn-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  outline: none;
}

.jox-btn-icon:hover {
  background: var(--jox-hover);
  color: var(--jox-text);
}


/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.jox-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.jox-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--jox-accent);
  border-radius: 50%;
  animation: jox-spin 0.8s linear infinite;
}

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


/* ============================================================
   PROGRESS BAR
   ============================================================ */
.jox-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border-radius: 1px;
}

.jox-progress-bar {
  height: 100%;
  background: var(--jox-accent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.jox-progress-indeterminate .jox-progress-bar {
  width: 30%;
  animation: jox-progress-slide 1.5s ease-in-out infinite;
}

@keyframes jox-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}


/* ============================================================
   SEARCH IN SIDEBAR
   ============================================================ */
.jox-search-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.jox-search-input-wrapper {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jox-search-input {
  height: 26px;
  background: var(--jox-input-bg);
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--jox-text);
  font-family: var(--jox-font-family);
  font-size: 13px;
  padding: 0 8px;
  outline: none;
  width: 100%;
}

.jox-search-input:focus {
  border-color: var(--jox-input-border);
}

.jox-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.jox-search-result-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--jox-text);
  cursor: pointer;
}

.jox-search-result-file:hover {
  background: var(--jox-list-hover);
}

.jox-search-result-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 12px 2px 28px;
  font-size: 12px;
  color: var(--jox-text);
  cursor: pointer;
  font-family: var(--jox-mono-font);
}

.jox-search-result-line:hover {
  background: var(--jox-list-hover);
}

.jox-search-match {
  background: rgba(234, 172, 0, 0.3);
  border: 1px solid rgba(234, 172, 0, 0.6);
  border-radius: 2px;
  padding: 0 1px;
}


/* ============================================================
   GIT / SOURCE CONTROL SIDEBAR
   ============================================================ */
.jox-git-change {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--jox-text);
  cursor: pointer;
}

.jox-git-change:hover {
  background: var(--jox-list-hover);
}

.jox-git-change-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.jox-git-change-badge.modified {
  color: #e2c08d;
  background: rgba(226, 192, 141, 0.15);
}

.jox-git-change-badge.added {
  color: #73c991;
  background: rgba(115, 201, 145, 0.15);
}

.jox-git-change-badge.deleted {
  color: #c74e39;
  background: rgba(199, 78, 57, 0.15);
}

.jox-git-change-badge.untracked {
  color: #73c991;
  background: rgba(115, 201, 145, 0.15);
}


/* ============================================================
   EXTENSIONS SIDEBAR
   ============================================================ */
.jox-extension-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.jox-extension-item:hover {
  background: var(--jox-list-hover);
}

.jox-extension-icon {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: var(--jox-input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--jox-text-dim);
  flex-shrink: 0;
}

.jox-extension-info {
  flex: 1;
  min-width: 0;
}

.jox-extension-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--jox-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jox-extension-publisher {
  font-size: 11px;
  color: var(--jox-text-dim);
}

.jox-extension-description {
  font-size: 12px;
  color: var(--jox-text-dim);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ============================================================
   TAB ACTIONS / EDITOR ACTIONS
   ============================================================ */
.jox-editor-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding-right: 8px;
  height: 100%;
}

.jox-editor-action-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--jox-text-dim);
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.jox-editor-action-btn:hover {
  background: var(--jox-hover);
  color: var(--jox-text);
}


/* ============================================================
   OUTPUT / DEBUG CONSOLE PANEL CONTENT
   ============================================================ */
.jox-output-container {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  font-family: var(--jox-mono-font);
  font-size: 12px;
  color: var(--jox-text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.jox-debug-console {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  font-family: var(--jox-mono-font);
  font-size: 12px;
  color: var(--jox-text);
  line-height: 1.5;
}


/* ============================================================
   PEEK / REFERENCE WIDGET
   ============================================================ */
.jox-peek-widget {
  border: 2px solid var(--jox-accent);
  background: var(--jox-sidebar-bg);
  display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow: hidden;
}

.jox-peek-header {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--jox-accent);
  color: #ffffff;
  font-size: 12px;
  gap: 8px;
}

.jox-peek-body {
  flex: 1;
  overflow: auto;
}


/* ============================================================
   DIFF EDITOR
   ============================================================ */
.jox-diff-added {
  background: rgba(155, 185, 85, 0.15);
}

.jox-diff-removed {
  background: rgba(255, 0, 0, 0.1);
}

.jox-diff-modified {
  background: rgba(0, 122, 204, 0.1);
}


/* ============================================================
   KEYBOARD SHORTCUT HINTS
   ============================================================ */
.jox-keybinding {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.jox-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  font-size: 11px;
  font-family: var(--jox-font-family);
  color: var(--jox-text);
  line-height: 1;
}


/* ============================================================
   DRAG-AND-DROP STATES
   ============================================================ */
.jox-drag-over {
  outline: 2px solid var(--jox-accent);
  outline-offset: -2px;
}

.jox-drop-target {
  background: rgba(0, 122, 204, 0.15);
}

.jox-dragging {
  opacity: 0.5;
}


/* ============================================================
   SELECTION HIGHLIGHT
   ============================================================ */
.jox-ide ::selection {
  background: var(--jox-selection);
  color: inherit;
}


/* ============================================================
   FOCUS VISIBILITY
   ============================================================ */
.jox-ide :focus-visible {
  outline: 1px solid var(--jox-accent);
  outline-offset: -1px;
}

.jox-ide button:focus-visible,
.jox-ide input:focus-visible {
  outline: 1px solid var(--jox-accent);
  outline-offset: -1px;
}


/* ============================================================
   BADGE COMPONENT
   ============================================================ */
.jox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--jox-badge-bg);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */
.jox-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--jox-text-dim);
  gap: 8px;
}

.jox-empty-state i {
  font-size: 32px;
  opacity: 0.3;
}

.jox-empty-state p {
  font-size: 13px;
  max-width: 300px;
  line-height: 1.5;
}


/* ============================================================
   SPLIT VIEW SASH
   ============================================================ */
.jox-sash {
  position: absolute;
  z-index: 100;
}

.jox-sash-horizontal {
  width: 100%;
  height: 4px;
  cursor: row-resize;
}

.jox-sash-vertical {
  width: 4px;
  height: 100%;
  cursor: col-resize;
}

.jox-sash:hover {
  background: var(--jox-accent);
  transition: background 0.15s 0.1s;
}

.jox-sash.active {
  background: var(--jox-accent);
}


/* ============================================================
   HEADER / SECTION COLLAPSE ARROWS
   ============================================================ */
.jox-collapse-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  color: var(--jox-text);
  transition: transform 0.1s;
}

.jox-collapse-indicator.collapsed {
  transform: rotate(-90deg);
}


/* ============================================================
   OVERRIDE: Make sure JOx is completely isolated from JaxsonOS
   ============================================================ */
.jox-ide,
.jox-ide * {
  font-variant: normal;
  font-variant-ligatures: normal;
  font-feature-settings: normal;
  text-rendering: auto;
  -webkit-tap-highlight-color: transparent;
}

.jox-ide a {
  color: var(--jox-accent);
  text-decoration: none;
}

.jox-ide a:hover {
  text-decoration: underline;
}

.jox-ide button {
  font-family: var(--jox-font-family);
}

.jox-ide input {
  font-family: var(--jox-font-family);
}

.jox-ide ul,
.jox-ide ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jox-ide img {
  max-width: 100%;
  display: block;
}

.jox-ide h1,
.jox-ide h2,
.jox-ide h3,
.jox-ide h4,
.jox-ide h5,
.jox-ide h6 {
  margin: 0;
  padding: 0;
  font-weight: 600;
  color: var(--jox-text);
}

.jox-ide p {
  margin: 0;
  padding: 0;
}


/* ============================================================
   RESPONSIVE / SMALL SCREEN
   ============================================================ */
.jox-save-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.jox-save-overlay.active { display: flex; }

.jox-save-dialog {
  background: #252526;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  width: 380px;
  max-width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.jox-save-overlay.active .jox-save-dialog {
  transform: scale(1);
  opacity: 1;
}

.jox-save-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #2d2d2d;
  border-bottom: 1px solid #3c3c3c;
}
.jox-save-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #cccccc;
}
.jox-save-title i { color: #007acc; font-size: 15px; }
.jox-save-close {
  background: none;
  border: none;
  color: #858585;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
}
.jox-save-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.jox-save-body { padding: 16px; }

.jox-save-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #1e1e1e;
  border-radius: 6px;
  margin-bottom: 14px;
}
.jox-save-preview-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #007acc, #005a9e);
  border-radius: 8px;
  font-size: 18px;
  color: white;
}
.jox-save-preview-info h4 { font-size: 13px; color: #ccc; margin: 0 0 2px 0; font-weight: 500; }
.jox-save-preview-info p { font-size: 11px; color: #858585; margin: 0; }

.jox-save-field { margin-bottom: 12px; }
.jox-save-field label {
  display: block;
  font-size: 11px;
  color: #858585;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.jox-save-field input,
.jox-save-field select {
  width: 100%;
  padding: 7px 10px;
  background: #3c3c3c;
  border: 1px solid #505050;
  border-radius: 4px;
  color: #cccccc;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.jox-save-field input:focus,
.jox-save-field select:focus { border-color: #007acc; }

.jox-save-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23858585'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.jox-save-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.jox-save-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.jox-save-btn.cancel { background: #3c3c3c; color: #ccc; }
.jox-save-btn.cancel:hover { background: #4a4a4a; }
.jox-save-btn.save { background: #007acc; color: white; }
.jox-save-btn.save:hover { background: #0069b3; }

@media (max-width: 768px) {
  .jox-sidebar {
    position: absolute;
    left: var(--jox-activitybar-width);
    top: 0;
    bottom: 0;
    z-index: 50;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3);
  }

  .jox-preview-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
  }
}
