/* ============================================
   MD WORKSPACE — PROFESSIONAL IDE STYLES
   ============================================ */

/* === IDE CONTAINER === */
.ide-container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: #1e1e1e;
}



.error-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

/* === IDE SIDEBAR === */
.ide-sidebar {
    width: 240px;
    background: #252526;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.ide-sidebar.collapsed { width: 0 !important; border: none; overflow: hidden; }
.ide-sidebar.collapsed + .ide-resizer { display: none !important; }

.ide-sidebar-toggle-btn {
    background: none;
    border: none;
    color: #858585;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #1e1e1e;
    font-size: 0.92rem;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ide-sidebar-toggle-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-sidebar-close-btn {
    display: none;
}

.ide-resizer {
    width: 6px;
    height: 100%;
    background: #2a2a2b;
    border-left: 1px solid #1e1e1e;
    border-right: 1px solid #1e1e1e;
    cursor: col-resize;
    z-index: 50;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}
.ide-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 30px;
    width: 2px;
    background: #555;
    border-radius: 2px;
    transition: background 0.2s;
}
.ide-resizer:hover, .ide-resizer.dragging {
    background: #333;
}
.ide-resizer:hover::after, .ide-resizer.dragging::after {
    background: var(--primary);
}

.ide-panel { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.ide-panel.active { display: flex; }

.ide-panel-header {
    padding: 10px 14px;
    font-size: 0.7rem;
    color: #bbb;
    font-weight: 700;
    letter-spacing: 1.2px;
    background: #252526;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.ide-panel-actions {
    display: flex;
    gap: 4px;
}

.ide-panel-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.ide-panel-actions button:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* File Tree (reuse existing styles) */
.sidebar-title {
    padding: 10px 15px;
    font-size: 0.7rem;
    color: #888;
    font-weight: bold;
    letter-spacing: 1px;
    background: #252526;
    border-bottom: 1px solid #333;
    margin-top: 5px;
}

#github-tree, #repo-file-tree { padding-bottom: 20px; }
.file-tree { flex: 1; overflow-y: auto; font-family: 'Inter', sans-serif; font-size: 0.85rem; }

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 14px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.85rem;
    position: relative;
    border-left: 2px solid transparent;
    transition: background 0.12s;
}
.file-item:hover { background: #2a2d2e; color: white; }
.file-item.active { background: #37373d; color: white; border-left-color: var(--primary); }

/* Cloud file tree: folders don't show action buttons */
.file-item.folder-item { padding-left: 14px; font-weight: 500; }
.file-item.folder-item:hover { background: #252526; }
.file-item.folder-item .file-actions { display: none !important; }

.file-item-content {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions { display: none; align-items: center; gap: 4px; margin-left: 8px; }
.file-item:hover .file-actions { display: flex; }

.action-icon {
    font-size: 0.7rem;
    color: #888;
    padding: 3px 4px;
    border-radius: 3px;
    transition: all 0.15s;
    background: transparent;
    border: none;
    cursor: pointer;
}
.action-icon:hover { background: rgba(255,255,255,0.1); color: var(--primary); }
.action-icon.delete:hover { color: var(--danger); }

.sidebar-header-action { float: right; cursor: pointer; color: var(--primary); }
.sidebar-header-action:hover { color: white; }

/* === DROPDOWN MENU === */
.dropdown-hover { position: relative; display: inline-block; }
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #2d2d2d;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    min-width: 130px;
    z-index: 100;
    padding: 4px 0;
}
.dropdown-hover:hover .dropdown-menu { display: flex; flex-direction: column; }
.dropdown-menu button {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 6px 12px;
    text-align: left;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    transition: background 0.1s;
}
.dropdown-menu button:hover { background: var(--primary); color: #fff; }
.dropdown-menu button.delete:hover { background: var(--danger); }

/* === SEARCH PANEL === */
.ide-search-box { padding: 10px; display: flex; flex-direction: column; gap: 10px; height: 100%; }

.ide-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #3c3c3c;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 10px;
    transition: border-color 0.2s;
}
.ide-search-input-wrap:focus-within { border-color: var(--primary); }
.ide-search-input-wrap i { color: #888; font-size: 0.8rem; }
.ide-search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.ide-search-results {
    flex: 1;
    overflow-y: auto;
    font-size: 0.8rem;
}

.search-result-item {
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #ccc;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.12s;
}
.search-result-item:hover { background: #2a2d2e; }
.search-result-file { color: var(--primary); font-weight: 600; font-size: 0.75rem; }
.search-result-line { color: #aaa; font-family: 'Fira Code', monospace; font-size: 0.75rem; }
.search-result-line mark { background: rgba(255,111,0,0.3); color: #fff; padding: 0 2px; border-radius: 2px; }

/* === TEMPLATES PANEL === */
.ide-templates-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.template-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #2a2d2e;
    border: 1px solid #3c3c3c;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.template-card:hover {
    background: #333;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.template-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255,111,0,0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.template-info { display: flex; flex-direction: column; gap: 2px; }
.template-info strong { font-size: 0.85rem; color: #fff; }
.template-info span { font-size: 0.7rem; color: #888; }

/* === EDITOR AREA === */
.ide-editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    overflow: hidden;
    min-width: 0;
}

/* === TABS BAR === */
.ide-tabs-bar {
    height: 38px;
    background: #252526;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}

.ide-tabs-scroll {
    display: flex;
    align-items: center;
    flex: 1;
    overflow-x: auto;
    height: 100%;
    scrollbar-width: none;
}
.ide-tabs-scroll::-webkit-scrollbar { display: none; }

.ide-file-tab {
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #2d2d2d;
    color: #999;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid #252526;
    border-top: 2px solid transparent;
    transition: all 0.15s;
    position: relative;
    font-family: 'Inter', sans-serif;
}
.ide-file-tab:hover { color: #fff; }
.ide-file-tab.active {
    background: #1e1e1e;
    color: #fff;
    border-top-color: var(--primary);
}
.ide-file-tab .tab-unsaved-dot {
    font-size: 0.6rem;
    color: var(--primary);
    display: none;
    line-height: 1;
}
.ide-file-tab.modified .tab-unsaved-dot { display: inline; }
.ide-file-tab .tab-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ide-file-tab .tab-close {
    font-size: 0.7rem;
    color: transparent;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    border: none;
    background: none;
    transition: all 0.1s;
    margin-left: 2px;
}
.ide-file-tab:hover .tab-close { color: #888; }
.ide-file-tab .tab-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* === TOOLBAR === */
.ide-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    flex-shrink: 0;
}

.ide-tool-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.ide-tool-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ide-tool-btn i { font-size: 0.75rem; }

.ide-tool-btn.deploy-btn {
    background: linear-gradient(135deg, var(--primary), #ff8a00);
    color: #fff;
    font-weight: 600;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(255,111,0,0.2);
}
.ide-tool-btn.deploy-btn:hover {
    box-shadow: 0 4px 14px rgba(255,111,0,0.35);
    transform: translateY(-1px);
}
.ide-tool-btn.run-btn {
    background: rgba(74, 246, 38, 0.1);
    color: #4af626;
    border: 1px solid rgba(74, 246, 38, 0.2);
    border-radius: 5px;
    font-weight: 600;
}
.ide-tool-btn.run-btn:hover {
    background: rgba(74, 246, 38, 0.18);
    box-shadow: 0 2px 8px rgba(74, 246, 38, 0.15);
}
.ide-tool-btn.active {
    background: rgba(255, 111, 0, 0.15);
    color: var(--primary);
    border-radius: 4px;
}

.save-dropdown-item:hover { background: #2a2d2e; }
.save-btn-group .deploy-btn { border-radius: 0; }
.save-btn-group .deploy-btn:first-child { border-radius: 4px 0 0 4px; }
.save-btn-group .deploy-btn:nth-child(2) { border-radius: 0 4px 4px 0; }

/* Developer Tools Group */
.ide-dev-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    border-right: 1px solid #3c3c3c;
    padding-right: 8px;
    margin-right: 4px;
}
.font-size-label {
    font-size: 0.72rem;
    color: #888;
    min-width: 20px;
    text-align: center;
    font-family: 'Fira Code', monospace;
    user-select: none;
}
.ide-tool-divider {
    width: 1px;
    height: 18px;
    background: #3c3c3c;
    margin: 0 4px;
}
.status-clickable { cursor: pointer; }
.status-clickable:hover { background: rgba(255,255,255,0.12); }

/* === SAVE INDICATOR === */
.save-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--success);
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
}
.save-indicator.saving { color: var(--warning); }
.save-indicator.saving i { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* === SPLIT VIEW === */
.ide-split-view {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.ide-code-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    position: relative;
    overflow: hidden;
}

#editor-wrapper { flex: 1; overflow: hidden; }
.CodeMirror { height: 100% !important; font-family: 'Fira Code', monospace; font-size: 13px; }
.CodeMirror-foldgutter { width: 1.2em; }

/* === AI EDIT BAR === */
#ai-edit-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    min-width: 380px;
    max-width: 700px;
    background: rgba(30, 30, 32, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 111, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 15px rgba(255,111,0,0.08);
    border-radius: 12px;
    padding: 10px 14px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

#ai-context-indicator { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: #aaa; }
#ai-context-badge {
    background: rgba(255,111,0,0.15);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid rgba(255,111,0,0.4);
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.ai-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 12px;
    transition: border-color 0.2s;
}
.ai-input-row:focus-within { border-color: var(--primary); }

#ai-edit-prompt {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    resize: none;
    outline: none;
    max-height: 100px;
    line-height: 1.4;
}
#ai-edit-prompt::placeholder { color: #555; }

.ai-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 6px;
    border-radius: 5px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-actions button:hover { background: rgba(255,255,255,0.1); color: #fff; }
#ai-submit-btn { color: var(--primary); background: rgba(255,111,0,0.1); }
#ai-submit-btn:hover { background: var(--primary); color: #fff; }

/* === PREVIEW PANEL === */
.ide-preview-panel {
    width: 0;
    background: #1e1e1e;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}
.ide-preview-panel.open { width: 50%; }

/* === PREVIEW PANEL RESIZER === */
.ide-preview-resizer {
    width: 5px;
    background: #2a2a2b;
    border-left: 1px solid #1e1e1e;
    cursor: col-resize;
    z-index: 50;
    flex-shrink: 0;
    transition: background 0.2s;
    display: none; /* Only visible when preview is open */
    align-items: center;
    justify-content: center;
    position: relative;
}
.ide-preview-panel.open ~ .ide-preview-resizer,
.ide-preview-resizer.active { display: flex; }
/* Show resizer when preview is open */
#preview-panel.open + #preview-resizer,
.ide-split-view:has(#preview-panel.open) #preview-resizer { display: flex; }
.ide-preview-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 30px;
    width: 2px;
    background: #555;
    border-radius: 2px;
    transition: background 0.2s;
}
.ide-preview-resizer:hover,
.ide-preview-resizer.dragging {
    background: #2d2d2d;
}
.ide-preview-resizer:hover::after,
.ide-preview-resizer.dragging::after {
    background: var(--primary);
}

.preview-toolbar {
    height: 38px;
    background: #252526;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bbb;
    font-size: 0.8rem;
    font-weight: 600;
}
.preview-title i { color: var(--primary); }

.responsive-controls { display: flex; gap: 2px; }
.resp-btn {
    background: none;
    border: none;
    color: #666;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.resp-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.resp-btn.active { color: var(--primary); background: rgba(255,111,0,0.12); }

.preview-close-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}
.preview-close-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.preview-frame-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    background: #0d0d0d;
    overflow: hidden;
    padding: 0;
}

.preview-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    transition: width 0.3s ease, box-shadow 0.3s ease;
}

.preview-frame-wrapper.responsive-tablet iframe {
    width: 768px;
    max-width: 100%;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}
.preview-frame-wrapper.responsive-mobile iframe {
    width: 375px;
    max-width: 100%;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

/* Preview Navigation Bar */
.preview-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #1b1b1b;
    border-bottom: 1px solid #2a2a2a;
}
.preview-nav-controls { display:flex; gap:6px; }
.nav-icon {
    background: none;
    border: none;
    color: #bdbdbd;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.nav-icon:hover { background: rgba(255,255,255,0.03); color: #fff; }
.preview-url-input {
    flex: 1;
    background: #0f0f10;
    border: 1px solid #262626;
    color: #ddd;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.preview-url-input[readonly] { opacity: 0.95; }

/* === BOTTOM PANEL (Errors) === */
.ide-bottom-panel {
    background: #1e1e1e;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    max-height: 200px;
    min-height: 120px;
    flex-shrink: 0;
}

.bottom-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    background: #252526;
    border-bottom: 1px solid #333;
    height: 32px;
    flex-shrink: 0;
}

.bottom-panel-tabs { display: flex; gap: 2px; }
.bp-tab {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    cursor: pointer;
    border-bottom: 2px solid var(--primary);
}

.bp-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    font-size: 0.8rem;
}
.bp-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

.bottom-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    font-size: 0.8rem;
}

.no-errors {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    padding: 10px;
    font-size: 0.82rem;
}

.error-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s;
    color: #ccc;
}
.error-item:hover { background: #2a2d2e; }
.error-item i { color: var(--danger); margin-top: 2px; font-size: 0.75rem; flex-shrink: 0; }
.error-item .error-msg { flex: 1; }
.error-item .error-file { color: #888; font-size: 0.72rem; margin-left: auto; white-space: nowrap; }

/* === STATUS BAR === */
.ide-status-bar {
    height: 24px;
    background: #007acc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    flex-shrink: 0;
    z-index: 5;
}

.status-left, .status-right { display: flex; align-items: center; gap: 2px; }

.status-item {
    font-size: 0.68rem;
    color: #fff;
    padding: 2px 8px;
    cursor: default;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 2px;
    transition: background 0.1s;
}

.status-item:hover { background: rgba(255,255,255,0.12); }
.status-item.status-clickable { cursor: pointer; }
.status-item.status-clickable:hover { background: rgba(255,255,255,0.2); }

/* Left separator between status groups */
.status-right .status-item + .status-item {
    border-left: 1px solid rgba(255,255,255,0.15);
}

#status-autosave i { animation: spin-slow 3s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {

    .ide-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 400;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 3px 0 15px rgba(0,0,0,0.4);
    }
    .ide-sidebar.open { transform: translateX(0); }

    .ide-preview-panel.open { width: 100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 300; }

    .ide-tool-btn .btn-label { display: none; }
    .ide-tool-btn { padding: 5px 8px; }

    .ide-bottom-panel { max-height: 150px; min-height: 80px; }

    #ai-edit-container { width: 92%; min-width: unset; bottom: 20px; }

    .ide-status-bar { height: 22px; }
    .status-item { font-size: 0.62rem; padding: 2px 5px; }
    .ide-resizer { display: none !important; }
    .mobile-sidebar-close-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .save-indicator span { display: none; }
    .responsive-controls { display: none; }
}

.status-msg {
    color: #666;
    text-align: center;
    padding: 20px;
    font-size: 0.82rem;
}

/* === CHAT FILE CARD === */
.chat-file-card {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chat-file-card:hover {
    background: #333;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.chat-file-icon {
    font-size: 1.8rem;
    color: var(--primary);
}
.chat-file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-file-name {
    font-weight: 600;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}
.chat-file-meta {
    font-size: 0.75rem;
    color: #999;
}
.chat-file-action {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 111, 0, 0.1);
    border-radius: 4px;
    transition: background 0.2s;
}
.chat-file-card:hover .chat-file-action {
    background: rgba(255, 111, 0, 0.2);
}

/* === GENERATED FILE CARD (AI chat — matches Zainin file-delivery UI) === */
.chat-generated-file {
    margin: 14px 0;
    max-width: 340px;
}
/* ===== Generated File ===== */

.chat-generated-file{
    width:100%;
    max-width:460px; /* desktop par chota */
    margin:8px 0;
}

.cgf-label{
    display:none;
}

.cgf-card{
    display:flex;
    align-items:center;
    gap:14px;

    background:linear-gradient(180deg,#081126,#070d1d);
    border:1px solid rgba(255,255,255,.06);
    border-radius:18px;

    padding:14px 16px;
    min-height:74px;

    transition:.2s ease;
}

.cgf-card:hover{
    border-color:rgba(255,255,255,.12);
    transform:translateY(-1px);
}

/* icon */

.cgf-icon{
    width:44px;
    height:44px;
    min-width:44px; /* mobile fix */
    flex-shrink:0;

    border-radius:12px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:1.45rem;
}

.cgf-icon.type-html{
    background:rgba(227,79,38,.12);
    color:#ff5a2d;
}

.cgf-icon.type-css{
    background:rgba(41,101,241,.12);
    color:#4f8dff;
}

.cgf-icon.type-js{
    background:rgba(247,223,30,.12);
    color:#f7df1e;
}

.cgf-icon.type-md{
    background:rgba(148,163,184,.12);
    color:#cbd5e1;
}

/* text */

.cgf-details{
    flex:1;
    min-width:0; /* ellipsis ke liye zaroori */
}

.cgf-name{
    color:#fff;
    font-size:1.02rem;
    font-weight:700;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.cgf-desc{
    margin-top:4px;
    color:#8f9bb2;
    font-size:.82rem;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* actions */

.cgf-actions{
    display:flex;
    align-items:center;
    gap:6px;

    flex-shrink:0; /* mobile fix */
}

.cgf-actions button,
.cgf-actions a{
    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;
    background:transparent;
    border-radius:8px;

    color:#9aa8c2;
    font-size:1rem;

    text-decoration:none;
    transition:.2s ease;
}

.cgf-actions button:hover,
.cgf-actions a:hover{
    background:rgba(255,255,255,.06);
    color:#fff;
}

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

@media (max-width:480px){

    .chat-generated-file{
        max-width:100%;
    }

    .cgf-card{
        padding:12px;
        gap:10px;
        min-height:64px;
    }

    .cgf-icon{
        width:38px;
        height:38px;
        min-width:38px;
        font-size:1.2rem;
    }

    .cgf-name{
        font-size:.92rem;
    }

    .cgf-desc{
        font-size:.72rem;
    }

    .cgf-actions button,
    .cgf-actions a{
        width:30px;
        height:30px;
        font-size:.9rem;
    }
}

/* === CUSTOM CONTEXT MENU === */
.custom-ctx-menu {
    position: absolute;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 10000;
    min-width: 180px;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
}

.custom-ctx-menu .ctx-item {
    padding: 10px 15px;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.custom-ctx-menu .ctx-item:hover {
    background: var(--primary);
    color: #fff;
}

.custom-ctx-menu .ctx-item i {
    width: 16px;
    text-align: center;
}

.error-highlight {
    background: rgba(239, 68, 68, 0.3) !important;
    transition: background 0.5s ease;
}

/* === IDE ZOOM CONTROLS (Status Bar) === */
.ide-zoom-controls {
    display: flex !important;
    align-items: center;
    gap: 4px;
    padding: 0 6px !important;
    border-left: 1px solid rgba(255,255,255,0.15);
}
.zoom-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
    font-weight: 700;
}
.zoom-btn:hover {
    background: rgba(255,255,255,0.25);
}
#ide-zoom-label {
    font-size: 0.68rem;
    color: #fff;
    min-width: 32px;
    text-align: center;
    font-family: 'Fira Code', monospace;
    user-select: none;
}

/* ========================================================
   PREMIUM UPGRADES - FULL STACK VS CODE + STACKBLITZ IDE
   ======================================================== */

/* Scrollbars styling */
.ide-sidebar ::-webkit-scrollbar,
.preview-tab-contents ::-webkit-scrollbar,
.bottom-panel-content ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.ide-sidebar ::-webkit-scrollbar-thumb,
.preview-tab-contents ::-webkit-scrollbar-thumb,
.bottom-panel-content ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.ide-sidebar ::-webkit-scrollbar-thumb:hover,
.preview-tab-contents ::-webkit-scrollbar-thumb:hover,
.bottom-panel-content ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Activity Bar Badge & Git Badge */
.git-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #007acc;
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 14px;
    text-align: center;
}

/* Replace Bar in Search Panel */
.replace-wrap {
    margin-top: 4px;
    border-color: rgba(255,255,255,0.08) !important;
}
.replace-all-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}
.replace-all-btn:hover {
    color: var(--primary);
}

/* Git Source Control Panel */
.git-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    gap: 16px;
    overflow-y: auto;
}
.git-branch-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.git-section-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}
#git-branch-selector {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}
.git-changes-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100px;
}
.git-changes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 6px;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: #bbb;
    font-weight: 600;
}
.git-changes-header .git-badge {
    position: static;
    background: #37373d;
    color: #ccc;
    font-size: 10px;
    padding: 1px 6px;
}
.git-files-list {
    flex: 1;
    overflow-y: auto;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.03);
}
.git-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.git-file-item i {
    font-size: 0.75rem;
}
.git-file-status {
    font-weight: bold;
    font-size: 0.7rem;
}
.git-file-status.modified { color: #e2c08d; }
.git-file-status.added { color: #73c991; }
.git-file-status.deleted { color: #c74e39; }

.git-commit-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #333;
    padding-top: 12px;
}
#git-commit-message {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #fff;
    padding: 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    resize: none;
    height: 60px;
    outline: none;
    font-family: inherit;
}
#git-commit-message:focus {
    border-color: var(--primary);
}
.git-commit-btn {
    background: linear-gradient(135deg, #007acc, #0098ff);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.15s, opacity 0.15s;
}
.git-commit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.git-file-item:hover { background: rgba(255,255,255,0.04); }
.git-file-diffstat {
    font-size: 0.68rem;
    font-family: 'Fira Code', monospace;
    display: flex;
    gap: 6px;
}
.diff-added-count { color: #73c991; font-weight: 700; }
.diff-removed-count { color: #f14c4c; font-weight: 700; }

.git-diff-modal {
    width: 720px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.git-diff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #333;
}
.git-diff-header h3 { font-size: 0.95rem; margin: 0 0 2px 0; }
.diff-stats { font-size: 0.75rem; font-family: 'Fira Code', monospace; }
.git-diff-close { background: none; border: none; color: #888; cursor: pointer; font-size: 1rem; }
.git-diff-close:hover { color: #fff; }
.git-diff-body {
    flex: 1;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    background: #1a1a1c;
    padding: 6px 0;
}
.diff-line {
    display: flex;
    padding: 1px 14px;
    white-space: pre-wrap;
    word-break: break-all;
}
.diff-marker { width: 16px; flex-shrink: 0; opacity: 0.7; user-select: none; }
.diff-same { color: #ccc; }
.diff-add { background: rgba(46,204,113,0.12); color: #9ee6b8; }
.diff-remove { background: rgba(231,76,60,0.12); color: #f3a9a1; }

/* AI Workspace Assistant Panel */
.ai-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.ai-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0,0,0,0.08);
}
.ai-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.ai-message i {
    font-size: 1rem;
    color: var(--primary);
    background: rgba(255, 111, 0, 0.1);
    padding: 6px;
    border-radius: 6px;
    margin-top: 2px;
}
.ai-message.user i {
    color: #007acc;
    background: rgba(0, 122, 204, 0.1);
}
.ai-message.user {
    flex-direction: row-reverse;
}
.msg-bubble {
    background: #2a2d2e;
    color: #ddd;
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.02);
    max-width: 85%;
    white-space: pre-wrap;
    word-break: break-word;
}
.ai-message.user .msg-bubble {
    background: #04395e;
    color: #fff;
}
.ai-chat-context {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #1e1e1f;
    border-top: 1px solid #333;
    font-size: 0.72rem;
    color: #888;
}
.ai-file-badge {
    background: rgba(255,111,0,0.12);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
}
.ai-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #252526;
    border-top: 1px solid #333;
    align-items: center;
}
#ai-workspace-prompt {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #fff;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.8rem;
    height: 34px;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.3;
}
#ai-workspace-prompt:focus {
    border-color: var(--primary);
}
.ai-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.ai-send-btn:hover {
    transform: scale(1.05);
}

/* API & DB Explorer Panel */
.api-db-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    background: #1e1e1f;
}
.api-db-tab {
    flex: 1;
    background: none;
    border: none;
    color: #888;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.api-db-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(255,255,255,0.02);
}
.api-db-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.api-db-subpanel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.api-request-row {
    display: flex;
    gap: 4px;
}
#api-method {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: var(--primary);
    font-weight: bold;
    padding: 6px;
    font-size: 0.78rem;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
#api-url {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #fff;
    padding: 6px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    outline: none;
}
.api-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}
.api-response-header {
    font-size: 0.72rem;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 8px;
}
#api-status-code {
    color: #73c991;
    font-weight: bold;
}
.api-response-body {
    background: #131314;
    border: 1px solid #222;
    border-radius: 4px;
    color: #8be9fd;
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin: 0;
}

/* DB Subpanel */
.db-selector-row select {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #ccc;
    padding: 6px;
    font-size: 0.8rem;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
.db-table-wrapper {
    overflow-x: auto;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1a1a1b;
}
.db-spreadsheet {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    color: #ccc;
}
.db-spreadsheet th {
    background: #252526;
    color: #888;
    text-align: left;
    padding: 6px 8px;
    font-weight: bold;
    border-bottom: 1px solid #333;
    border-right: 1px solid #333;
}
.db-spreadsheet td {
    padding: 6px 8px;
    border-bottom: 1px solid #2a2a2b;
    border-right: 1px solid #2a2a2b;
    white-space: nowrap;
}
.db-spreadsheet tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Extensions Marketplace */
.extensions-list {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    overflow-y: auto;
}
.extension-item {
    display: flex;
    gap: 12px;
    background: #252526;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    align-items: flex-start;
}
.ext-icon {
    font-size: 1.1rem;
    color: var(--primary);
    background: rgba(255, 111, 0, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ext-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.ext-details strong {
    font-size: 0.8rem;
    color: #fff;
}
.ext-details span {
    font-size: 0.7rem;
    color: #aaa;
    line-height: 1.3;
}
.ext-btn {
    align-self: flex-start;
    background: #007acc;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: 600;
}
.ext-btn.installed {
    background: #2d2d2d;
    color: #888;
    cursor: default;
    border: 1px solid #444;
}

/* IDE Settings Panel */
.ide-settings-panel {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 14px;
}
.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.setting-item label {
    font-size: 0.75rem;
    color: #aaa;
    font-weight: bold;
}
.setting-item select {
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    color: #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}
.checkbox-label {
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

/* Breadcrumbs Bar styling */
.ide-breadcrumbs {
    height: 28px;
    background: #1c1c1d;
    border-bottom: 1px solid #252526;
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.72rem;
    color: #888;
    user-select: none;
    flex-shrink: 0;
}
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.breadcrumb-item:hover {
    color: #ddd;
}
.breadcrumb-separator {
    margin: 0 6px;
    font-size: 0.65rem;
    color: #555;
}
#breadcrumb-filename {
    color: #ccc;
    font-weight: 600;
}
.collaboration-avatars {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: -4px;
}
.collab-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #252526;
    object-fit: cover;
    margin-left: -4px;
    transition: transform 0.15s;
    cursor: pointer;
}
.collab-avatar:hover {
    transform: translateY(-2px);
    z-index: 10;
}

/* Editor Panes Split Layout */
.editor-layout-wrapper {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.editor-pane {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
}
.editor-pane.active {
    display: block;
}
.editor-pane + .editor-pane {
    border-left: 1px solid #2d2d2d;
}

/* Minimap container */
.editor-minimap-container {
    width: 64px;
    height: 100%;
    background: #1e1e1e;
    border-left: 1px solid rgba(255,255,255,0.03);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    user-select: none;
}
#editor-minimap-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.65;
}
.editor-minimap-container:hover #editor-minimap-canvas {
    opacity: 0.9;
}

/* Inline AI Selection Popup */
.inline-ai-popup {
    position: absolute;
    background: rgba(30, 30, 32, 0.95);
    border: 1px solid rgba(255, 111, 0, 0.35);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    z-index: 9999;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 280px;
    backdrop-filter: blur(10px);
}
.inline-ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.inline-ai-actions button {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 4px;
    color: #ccc;
    font-size: 0.7rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1 1 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.inline-ai-actions button:hover {
    background: var(--primary);
    color: white;
}
.inline-ai-input-row {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 6px;
}
#inline-ai-custom-prompt {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 0.72rem;
    outline: none;
}
#inline-ai-submit-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
}

/* DevTools Style Live Preview Panel */
.preview-tabs-header {
    height: 38px;
    background: #252526;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.preview-tabs-header::-webkit-scrollbar { display: none; }
.preview-tab {
    padding: 0 14px;
    height: 100%;
    background: none;
    border: none;
    color: #888;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    border-bottom: 2px solid transparent;
}
.preview-tab:hover {
    color: #ddd;
}
.preview-tab.active {
    color: #fff;
    border-bottom-color: var(--primary);
    background: #1e1e1e;
}
.preview-tab i {
    font-size: 0.8rem;
}
.console-badge {
    background: var(--danger);
    color: white;
    font-size: 9px;
    padding: 0px 4px;
    border-radius: 8px;
}
.preview-tab-spacer {
    flex: 1;
}
.preview-tab-contents {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.preview-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Browser Sub-Tabs */
.preview-subtabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}
.preview-subtab {
    background: #2d2d2d;
    color: #999;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.preview-subtab:hover { color: #fff; }
.preview-subtab.active {
    background: #007acc;
    color: #fff;
}
.new-subtab-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 4px;
}

/* Dev Console logs */
.console-toolbar {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #1b1b1c;
    border-bottom: 1px solid #2a2a2b;
    gap: 12px;
}
.console-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid #333;
    color: #ccc;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.console-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
#console-filter-input {
    background: #0f0f10;
    border: 1px solid #262626;
    color: #ddd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    outline: none;
}
.console-logs {
    flex: 1;
    overflow-y: auto;
    background: #151516;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
}
.console-log-item {
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding: 4px 0;
    display: flex;
    gap: 8px;
    white-space: pre-wrap;
    word-break: break-all;
}
.console-log-item.info { color: #888; }
.console-log-item.log { color: #ccc; }
.console-log-item.warn { color: #f1c40f; background: rgba(241,196,15,0.03); }
.console-log-item.error { color: #e74c3c; background: rgba(231,76,60,0.04); }
.log-time {
    color: #555;
    flex-shrink: 0;
}
.console-input-row {
    display: flex;
    align-items: center;
    background: #181819;
    border-top: 1px solid #2d2d2e;
    padding: 8px 12px;
    gap: 8px;
}
#console-input-eval {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    outline: none;
}

/* Network Inspector styling */
.network-toolbar {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #1b1b1c;
    border-bottom: 1px solid #2a2a2b;
    gap: 12px;
    font-size: 0.75rem;
    color: #888;
}
.network-stat span { color: #ddd; font-weight: bold; }
.network-table-container {
    flex: 1;
    overflow-y: auto;
    background: #151516;
}
.network-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.network-table th {
    background: #1e1e1f;
    color: #888;
    text-align: left;
    padding: 8px 10px;
    font-weight: bold;
    border-bottom: 1px solid #2d2d2e;
}
.network-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    color: #ccc;
}
.network-row:hover td {
    background: rgba(255,255,255,0.02);
}
.network-status-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.68rem;
}
.network-status-badge.success { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.network-status-badge.error { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

/* Processes & Services styling */
.processes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #1b1b1c;
    border-bottom: 1px solid #2d2d2e;
    font-size: 0.78rem;
    font-weight: bold;
    color: #ccc;
}
.run-task-btn {
    background: #27ae60;
    border: none;
    color: white;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.processes-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #151516;
}
.process-card {
    background: #1e1e1f;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.process-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.process-name-lbl {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}
.process-name-lbl i { color: #2ecc71; }
.process-status-indicator {
    font-size: 0.7rem;
    background: rgba(39, 174, 96, 0.15);
    color: #2ecc71;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}
.process-metrics {
    display: flex;
    gap: 16px;
}
.metric-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.7rem;
    color: #888;
}
.metric-progress {
    height: 4px;
    background: #2a2a2b;
    border-radius: 2px;
    overflow: hidden;
}
.metric-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}
.process-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px solid #2a2a2b;
    padding-top: 6px;
}
.proc-btn {
    background: none;
    border: 1px solid #333;
    color: #aaa;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.proc-btn:hover { background: rgba(255,255,255,0.04); color: #fff; }
.proc-btn.stop { border-color: rgba(231,76,60,0.3); color: #e74c3c; }

/* Package Manager */
.packages-search-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #1b1b1c;
    border-bottom: 1px solid #2a2a2b;
}
#npm-search-input {
    flex: 1;
    background: #0f0f10;
    border: 1px solid #262626;
    color: #fff;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.8rem;
    outline: none;
}
.install-pkg-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
}
.packages-list-section {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #151516;
}
.packages-list-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.78rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.dependencies-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.dependency-card {
    background: #1e1e1f;
    border: 1px solid #2c2c2d;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dep-name {
    font-size: 0.8rem;
    color: #ddd;
    font-weight: 600;
}
.dep-version {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--primary);
}

/* Git Timeline styling */
.git-commits-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #151516;
}
.commit-timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
}
.commit-timeline-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 16px;
    bottom: -16px;
    width: 2px;
    background: #333;
}
.commit-timeline-item:last-child::before {
    display: none;
}
.commit-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007acc;
    border: 3px solid #151516;
    z-index: 2;
    margin-top: 4px;
    flex-shrink: 0;
}
.commit-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.commit-msg-txt {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
}
.commit-meta-txt {
    font-size: 0.7rem;
    color: #888;
}
.commit-author {
    color: var(--primary);
}
.commit-hash {
    font-family: 'Fira Code', monospace;
    color: #73c991;
    background: rgba(115, 201, 145, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
}

/* =============================================
   VS CODE FEATURES: Outline, Stats, Sticky Scroll
   ============================================= */

/* Symbol Outline Panel */
#panel-outline {
    padding: 0;
    overflow-y: auto;
}
.outline-header {
    font-size: 0.65rem;
    color: #555;
    letter-spacing: 0.08em;
    padding: 10px 14px 6px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid #2a2a2a;
}
.outline-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    font-size: 0.78rem;
    color: #ccc;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 3px;
    margin: 1px 4px;
}
.outline-item:hover {
    background: rgba(255,111,0,0.08);
    color: #fff;
}
.outline-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.outline-line {
    font-size: 0.65rem;
    color: #555;
    font-variant-numeric: tabular-nums;
}
.outline-empty {
    text-align: center;
    padding: 30px 14px;
    font-size: 0.75rem;
    color: #444;
    line-height: 2;
}

/* Status Bar Stats */
#status-file-stats {
    font-size: 0.68rem;
    color: #858585;
    padding: 0 10px;
    cursor: default;
    user-select: none;
    letter-spacing: 0.02em;
}
#status-cursor-pos {
    font-size: 0.68rem;
    color: #858585;
    padding: 0 6px;
    cursor: pointer;
    user-select: none;
}
#status-cursor-pos:hover {
    color: #fff;
    background: rgba(255,111,0,0.15);
}

/* Sticky Scope Label (above editor) */
#sticky-scope-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    font-size: 0.7rem;
    color: #555;
    padding: 2px 10px;
    background: rgba(18,18,18,0.85);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid #222;
    pointer-events: none;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    letter-spacing: 0.03em;
    min-height: 18px;
    transition: color 0.2s;
}
#sticky-scope-label:not(:empty) {
    color: #ff6f00aa;
}
/* ============================================
   EXPLORER FILTER TABS
   ============================================ */
.expl-filter-tab {
    font-size: 0.63rem;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.expl-filter-tab:hover {
    background: rgba(255,111,0,0.08);
    border-color: rgba(255,111,0,0.3);
    color: #fff;
}
.expl-filter-tab.active {
    background: rgba(255,111,0,0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   INLINE AI POPUP BUTTONS
   ============================================ */
.inline-ai-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 0.68rem;
    cursor: pointer;
    padding: 6px 9px;
    border-right: 1px solid #222;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.inline-ai-btn:last-child { border-right: none; }
.inline-ai-btn:hover {
    background: rgba(255,111,0,0.12);
    color: var(--primary);
}

/* ============================================
   PUBLISH BUTTON
   ============================================ */
.publish-btn {
    background: linear-gradient(135deg, #ff6a00, #ff8c38) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
}
.publish-btn:hover {
    background: linear-gradient(135deg, #ff8c38, #ff6a00) !important;
    box-shadow: 0 0 12px rgba(255,106,0,0.35);
}

/* ============================================
   CREATE NEW REPO SECTION
   ============================================ */
#create-new-repo-section {
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }

/* ============================================
   @ MENTION DROPUP
   ============================================ */
.mention-dropdown {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.8);
}
.mention-item:hover {
    background: rgba(255,111,0,0.08) !important;
}
.mention-dropdown::-webkit-scrollbar { width: 4px; }
.mention-dropdown::-webkit-scrollbar-track { background: transparent; }
.mention-dropdown::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ============================================
   EDITOR WELCOME SCREEN
   ============================================ */
#editor-welcome-screen button {
    transition: all 0.15s ease;
}
#editor-welcome-screen button:hover {
    background: #1e1e24 !important;
    transform: translateY(-1px);
}

/* ============================================
   EXPLORER PANEL ICONS
   ============================================ */
.ide-panel-actions button {
    transition: color 0.15s, transform 0.15s;
}
.ide-panel-actions button:hover {
    transform: scale(1.15);
    opacity: 0.9;
}

/* ============================================
   PREMIUM CUSTOM SELECT DROPDOWNS
   ============================================ */
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
    padding-right: 30px !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
select:hover {
    border-color: #555 !important;
}
select:focus {
    border-color: var(--primary, #ff6f00) !important;
    box-shadow: 0 0 0 2px rgba(255, 111, 0, 0.15) !important;
}

/* ============================================
   QUICK OPEN (Ctrl+P) — MATCHES FIGMA/VS CODE STYLE
   ============================================ */
#quick-open-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    animation: qopFadeIn 0.15s ease;
}
@keyframes qopFadeIn {
    from { opacity:0; transform:translateY(-10px); }
    to { opacity:1; transform:translateY(0); }
}
#quick-open-modal .modal {
    width: 92%;
    max-width: 480px;
    background: #252526;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    animation: qopSlideUp 0.18s ease;
}
@keyframes qopSlideUp {
    from { opacity:0; transform:translateY(-20px) scale(0.98); }
    to { opacity:1; transform:translateY(0) scale(1); }
}

#quick-open-input {
    width: 100%;
    box-sizing: border-box;
    background: #1e1e1e;
    border: none;
    color: #fff;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-family: 'Fira Code', monospace;
    outline: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#quick-open-input::placeholder { color: #888; }
#quick-open-input:focus {
    border-bottom-color: #ff6f00;
    box-shadow: 0 0 0 2px rgba(255, 111, 0, 0.15);
}

#quick-open-results {
    max-height: 340px;
    overflow-y: auto;
    padding-top: 4px;
}
#quick-open-results::-webkit-scrollbar { width: 4px; }
#quick-open-results::-webkit-scrollbar-track { background: transparent; }
#quick-open-results::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

.qo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #ddd;
    transition: all 0.12s ease;
}
.qo-item .fa {
    color: #888;
    font-size: 0.8rem;
    width: 18px;
    text-align: center;
}

/* Selected item */
.qo-item.active {
    background: rgba(255, 111, 0, 0.15);
    color: #fff;
}
.qo-item.active .fa {
    color: #ff6f00;
}

/* Folder rows styling */
.qo-item.folder-row {
    font-weight: 600;
    color: #eee;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.qo-item.folder-row .fa { color: #f4c430; }
.qo-item.folder-row:hover { background: #04395e; }

/* Match Figma-style highlighted text */
.qo-item.active .qo-highlight {
    color: #ff9e3b;
    font-weight: 600;
}

/* Small file icons (16x16) */
.qo-item i.small-file-icon {
    font-size: 0.75rem;
}

/* No results message */
.qo-no-results {
    padding: 16px;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
}