.dev-sources-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #d7d7d7;
  background: #1e1e1e;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.dev-sources-page *,
.dev-sources-page *::before,
.dev-sources-page *::after {
  box-sizing: border-box;
}

/* =========================
   Toolbar
   ========================= */

.dev-sources-toolbar {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-bottom: 1px solid #333;
  background: #252526;

}

.dev-sources-search {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #3f3f46;
  border-radius: 3px;
  outline: none;
  color: #ddd;
  background: #181818;
}

.dev-sources-search::placeholder {
  color: #666;
}

.dev-sources-search:focus {
  border-color: #007acc;
}

.dev-sources-toolbar-button,
.dev-source-viewer-actions button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid #444;
  border-radius: 3px;
  color: #ddd;
  background: #303030;
  cursor: pointer;
}

.dev-sources-toolbar-button:hover,
.dev-source-viewer-actions button:hover {
  background: #3b3b3b;
}

.dev-sources-toolbar-button:active,
.dev-source-viewer-actions button:active {
  background: #252525;
}

/* =========================
   Body
   ========================= */

.dev-sources-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
}

/* =========================
   Sidebar
   ========================= */

.dev-sources-sidebar {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid #333;
  background: #252526;
}

.dev-sources-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.dev-source-item {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 3px;
  border-bottom: 1px solid transparent;
  color: #ccc;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dev-source-item:hover {
  background: #303030;
}

.dev-source-item.active {
  color: #fff;
  background: #094771;
}

.dev-source-item-icon {
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #858585;
  font-size: 10px;
  font-weight: 600;
}

.dev-source-item.active
.dev-source-item-icon {
  color: #fff;
}

.dev-source-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dev-source-item-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d7d7d7;
  font-weight: 600;
}

.dev-source-item-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #858585;
  font-size: 11px;
}

.dev-source-item.active
.dev-source-item-name,
.dev-source-item.active
.dev-source-item-url {
  color: #fff;
}

.dev-source-item-status {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #858585;
  font-size: 10px;
}

/* =========================
   Main Viewer
   ========================= */

.dev-sources-main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1e1e1e;
}

.dev-source-viewer {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =========================
   Viewer Header
   ========================= */

.dev-source-viewer-header {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid #333;
  background: #252526;
}

.dev-source-viewer-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eee;
  font-weight: 600;
}

.dev-source-viewer-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* =========================
   Metadata
   ========================= */

.dev-source-metadata {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid #333;
  background: #333;
}

.dev-source-meta-row {
  min-width: 0;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px 10px;
  background: #1e1e1e;
}

.dev-source-meta-key {
  color: #858585;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.dev-source-meta-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ccc;
  font-size: 12px;
}

/* =========================
   Source Code
   ========================= */

.dev-source-code-wrapper {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #1e1e1e;
}

.dev-source-code {
  margin: 0;
  min-width: max-content;
  padding: 14px;
  color: #d7d7d7;
  background: #1e1e1e;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 12px;
  line-height: 1.6;
  tab-size: 2;
}

.dev-source-code code {
  color: #d7d7d7;
  background: transparent;
  white-space: pre;
}

/* =========================
   Image
   ========================= */

.dev-source-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
}

/* =========================
   Media
   ========================= */

.dev-source-media-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #1e1e1e;
}

.dev-source-media-preview video,
.dev-source-media-preview audio {
  max-width: 100%;
  max-height: 100%;
}

/* =========================
   Empty / Unavailable
   ========================= */

.dev-source-unavailable,
.dev-source-empty-view,
.dev-sources-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: #666;
  background: #1e1e1e;
  text-align: center;
}

/* =========================
   Scrollbars
   ========================= */

.dev-sources-sidebar::-webkit-scrollbar,
.dev-source-code-wrapper::-webkit-scrollbar,
.dev-sources-main::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dev-sources-sidebar::-webkit-scrollbar-thumb,
.dev-source-code-wrapper::-webkit-scrollbar-thumb,
.dev-sources-main::-webkit-scrollbar-thumb {
  background: #3b4049;
  border-radius: 4px;
}

.dev-sources-sidebar::-webkit-scrollbar-track,
.dev-source-code-wrapper::-webkit-scrollbar-track,
.dev-sources-main::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 800px) {
  .dev-sources-body {
    grid-template-columns:
      220px minmax(0, 1fr);
  }

  .dev-source-metadata {
    grid-template-columns: 1fr;
  }
}