/* tools-compiler.css - Midnight Indigo Hub Theme */

/* ========================================================
   PAGE-SCOPED PALETTE — kills global orange on this page
   ======================================================== */
.page-tools {
    --accent: #6574cd !important;
    --ac: #6574cd !important;
    --ac05: rgba(101, 116, 205, 0.06) !important;
    --ac10: rgba(101, 116, 205, 0.12) !important;
    --ac15: rgba(101, 116, 205, 0.18) !important;
    --ac40: rgba(101, 116, 205, 0.35) !important;

    /* Icon palette — distinct per compiler */
    --ic-head: #6574cd;
    --ic-amxx: #c9a962;
    --ic-sourcemod: #58b58e;
    --ic-cssharp: #a87df2;
    --ic-build: #a87df2;
    --ic-config: #6d8ec9;
    --ic-includes: #c9a962;
    --ic-single: #6d8ec9;
    --ic-project: #8490e0;
    --ic-nuget: #58b58e;
    --ic-dotnet: #8490e0;
}

/* Breadcrumb — same vertical band as sidebar brandbox */
.page-tools .cd-main .breadcrumb {
    margin-top: 4px;
    height: 38px;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    padding-top: 0;
}
.page-tools .cd-main .breadcrumb a:hover { color: #6574cd; }

/* Sidebar icon colors */
.page-tools .cd-sb-brandbox svg { color: var(--ic-head) !important; }
.page-tools .cd-sb-headcard svg { color: var(--ic-head) !important; }
.page-tools .cd-sb-link[href*="amxx"] svg { color: var(--ic-amxx) !important; }
.page-tools .cd-sb-link[href*="sourcemod"] svg { color: var(--ic-sourcemod) !important; }
.page-tools .cd-sb-link[href*="cssharp"] svg { color: var(--ic-cssharp) !important; }
.page-tools .widget .score-vote-btn svg { color: var(--ic-head) !important; }

/* IDE sidebar section icons */
.page-tools .tcx-sidebar-build .tcx-sidebar-title svg { color: var(--ic-build) !important; }
.page-tools .tcx-sidebar-config .tcx-sidebar-title svg { color: var(--ic-config) !important; }
.page-tools .tcx-sidebar-includes .tcx-sidebar-title svg { color: var(--ic-includes) !important; }
.page-sourcemod .tcx-sidebar-includes .tcx-sidebar-title svg { color: var(--ic-sourcemod) !important; }
.page-tools .tcx-mode-tab[data-mode="single"] svg { color: var(--ic-single) !important; }
.page-tools .tcx-mode-tab[data-mode="project"] svg { color: var(--ic-project) !important; }
.page-tools .tcx-hub-chips .tcx-chip:nth-child(1) svg { color: var(--ic-dotnet) !important; }
.page-tools .tcx-hub-chips .tcx-chip:nth-child(2) svg { color: var(--ic-nuget) !important; }
.page-tools .tcx-drop-inner .tcx-drop-icon svg { color: var(--ic-head) !important; }
.page-amxx .tcx-drop-compact .tcx-drop-icon svg { color: var(--ic-amxx) !important; }
.page-sourcemod .tcx-drop-compact .tcx-drop-icon svg { color: var(--ic-sourcemod) !important; }
.page-tools .tcx-header-right > .tcx-chip:not(.tcx-chip-err) svg { color: var(--ic-nuget) !important; }
.page-tools .tcx-add-inc svg { color: var(--ic-head) !important; }
.page-tools .tcx-inc-row svg { color: var(--ic-config) !important; }

/* Build / Download — white icon on filled button */
.page-tools .tcx-action-btn svg { color: #ffffff !important; }
.page-tools .tcx-action-btn:disabled svg { color: var(--ide-text-dim) !important; opacity: 1; }

.tcx-ide {
    /* Match sidebar panels */
    --ide-bg: var(--bg1);
    --ide-panel: var(--bg1);
    --ide-panel-light: var(--bg2);
    --ide-inset: var(--bg2);
    /* Subtle editor surface — slightly cooler/darker than bg1, not pitch black */
    --ide-editor: #0d0e13;
    
    --ide-border: var(--border);      
    --ide-border-light: var(--border2);
    
    --ide-text: var(--text, #e4e4e7);        
    --ide-text-sec: var(--text2, #a1a1aa);    
    --ide-text-dim: var(--muted, #737885);    
    
    --ide-ac: #6574cd;
    --ide-ac-hover: #5a67b5;
    
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    min-height: 580px;
    background: var(--ide-panel);
    color: var(--ide-text-sec);
    border-radius: 12px;
    border: 1px solid var(--ide-border);
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Page width — same as navbar / default .wrap (1320px) */

/* Tools sidebar — per-link icon accents */
.tcx-sb-steps { 
    margin: 0; 
    padding: 12px 14px 14px 30px; 
    font-size: 0.8rem; 
    line-height: 1.6; 
    color: var(--text2); 
}
.tcx-sb-steps li { 
    margin-bottom: 8px; 
    padding-left: 4px;
}
.tcx-sb-steps li::marker {
    color: #6574cd;
    font-weight: 700;
}
.tcx-sb-steps code { 
    font-family: Consolas, "JetBrains Mono", monospace !important; 
    font-size: inherit !important; 
    background: transparent !important; 
    padding: 0 !important; 
    border: none !important;
    border-radius: 0 !important;
    color: #6574cd !important; 
}
.tcx-sb-steps .tcx-sb-path {
    display: inline;
    margin: 0;
    padding: 0 !important;
    font-size: inherit !important;
    white-space: normal;
    letter-spacing: normal;
    color: #6574cd !important;
    background: transparent !important;
    border: none !important;
}
.tcx-sb-note { 
    margin: 0; 
    font-size: 0.75rem; 
    color: var(--muted); 
    line-height: 1.4; 
    padding: 10px; 
    text-align: center; 
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border);
}

.tcx-sb-statsbox .cd-sb-headcard svg { color: #6574cd; }
.tcx-sb-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px 8px;
}
.tcx-sb-stat {
    padding: 10px 8px;
    border-radius: 8px;
    background: var(--bg2);
    border: 1px solid var(--border);
    text-align: center;
}
.tcx-sb-stat-n {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.tcx-sb-stat-l {
    display: block;
    margin-top: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
}
.tcx-sb-stat-ok .tcx-sb-stat-n { color: #58b58e; }
.tcx-sb-stat-fail .tcx-sb-stat-n { color: #d97979; }
.tcx-sb-stats-total {
    margin: 0;
    padding: 0 12px 12px;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
}
.tcx-sb-stats-total strong { color: var(--text2); font-weight: 700; }

/* ========================================================
   IDE HEADER
   ======================================================== */
.tcx-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; background: rgba(255,255,255,.015); border-bottom: 1px solid var(--ide-border);
    position: relative; overflow: hidden;
}
.tcx-header::before {
    content:''; position:absolute; inset:0;
    background:linear-gradient(90deg, rgba(101, 116, 205, 0.09) 0%, rgba(101, 116, 205, 0.035) 28%, transparent 72%);
    pointer-events:none;
}
.tcx-header > * { position: relative; z-index: 1; }

.tcx-header-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.tcx-title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--ide-text); display: flex; align-items: center; gap: 8px; letter-spacing: -0.2px; white-space: nowrap; }
.tcx-title span { color: #6574cd; font-weight: 700; }
.tcx-subtitle { font-size: 0.8rem; color: var(--ide-text-dim); margin: 0; padding-left: 14px; border-left: 1px solid var(--ide-border-light); white-space: nowrap; }
.tcx-desc { font-size: 0.75rem; color: var(--ide-text-dim); margin: 0; padding: 8px 20px; line-height: 1.4; opacity: 0.7; border-bottom: 1px solid var(--ide-border); }

/* Info chip (About) */
.tcx-chip-info {
    cursor: pointer; border: 1px solid var(--ide-border); background: var(--ide-panel-light);
    color: var(--ide-text-sec); font-family: inherit; transition: border-color 0.15s, color 0.15s;
}
.tcx-chip-info:hover { border-color: var(--ide-ac); color: var(--ide-ac); }

/* Info modal */
.tcx-info-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.tcx-info-modal[hidden] { display: none; }
.tcx-info-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.tcx-info-content {
    position: relative; z-index: 1; width: 520px; max-width: 92vw; max-height: 80vh;
    background: var(--ide-panel, #1e1f2b); border: 1px solid var(--ide-border, #2d2e3d);
    border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
}
.tcx-info-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid var(--ide-border, #2d2e3d);
}
.tcx-info-head h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ide-text, #e4e4e7); }
.tcx-info-x {
    width: 28px; height: 28px; border: none; background: none; color: var(--ide-text-dim, #737885);
    font-size: 1.3rem; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.tcx-info-x:hover { color: var(--ide-text, #e4e4e7); background: var(--ide-inset, #16171e); }
.tcx-info-body {
    padding: 20px 24px; overflow-y: auto; font-size: 0.88rem; line-height: 1.65;
    color: var(--ide-text-sec, #a1a1aa);
}
.tcx-info-body p { margin: 0 0 12px; }
.tcx-info-body h3 { margin: 16px 0 8px; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ide-text, #e4e4e7); }
.tcx-info-body ul { margin: 0 0 12px; padding-left: 20px; }
.tcx-info-body li { margin: 0 0 4px; }
.tcx-info-body code { font-family: Consolas, "JetBrains Mono", monospace; font-size: 0.82em; background: var(--ide-inset, #16171e); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--ide-border, #2d2e3d); color: var(--ide-text, #e4e4e7); }

.tcx-header-right { display: flex; align-items: center; gap: 10px; }
.tcx-hub-chips { display: flex; gap: 8px; }
.tcx-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600;
    color: var(--ide-text-sec); background: var(--ide-panel-light); border: 1px solid var(--ide-border);
}
.tcx-chip-err { color: #ed6a5e; border-color: rgba(237, 106, 94, 0.3); background: rgba(237, 106, 94, 0.08); }
.tcx-section-desc { margin: 0 0 12px; font-size: 0.75rem; color: var(--ide-text-dim); line-height: 1.5; }
.tcx-section-desc code { font-size: 0.72rem; background: var(--ide-inset); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--ide-border); color: var(--ide-text-sec); }

/* ========================================================
   IDE BODY & SIDEBAR
   ======================================================== */
.tcx-ide-body { display: flex; flex: 1; overflow: hidden; margin: 0; min-height: 0; max-height: calc(100vh - 200px); }

.tcx-sidebar {
    width: 320px; flex-shrink: 0; background: var(--ide-panel);
    border-right: 1px solid var(--ide-border);
    display: flex; flex-direction: column; overflow-y: auto;
}

.tcx-sidebar-section { padding: 20px; border-bottom: 1px solid var(--ide-border); }
.tcx-sidebar-title {
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--ide-text); margin: 0 0 16px 0; display: flex; align-items: center; gap: 8px;
}

/* Mode Tabs */
.tcx-mode-tabs { display: flex; background: var(--ide-inset); padding: 4px; border-radius: 8px; border: 1px solid var(--ide-border); }
.tcx-mode-tab {
    flex: 1; height: 36px; border-radius: 6px; border: none; background: transparent;
    color: var(--ide-text-sec); font-size: 0.85rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.15s; font-family: inherit;
}
.tcx-mode-tab:hover { color: var(--ide-text); }
.tcx-mode-tab.active { background: var(--ide-panel-light); color: var(--ide-text); border: 1px solid var(--ide-border-light); }

/* Forms */
.tcx-settings .form-g { margin-bottom: 20px; }
.tcx-settings label { display: block; color: var(--ide-text); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.tcx-settings label .tcx-hint { font-weight: 400; font-size: 0.75rem; color: var(--ide-text-dim); }
.tcx-settings select, .tcx-settings input[type="text"] {
    width: 100%; height: 42px; box-sizing: border-box;
    background: var(--ide-inset); border: 1px solid var(--ide-border);
    color: var(--ide-text); border-radius: 6px; padding: 0 14px;
    font-size: 0.85rem; font-family: inherit; transition: border-color 0.15s;
}
.tcx-settings select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    background-color: var(--ide-inset);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394949c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}
.tcx-settings select:focus, .tcx-settings input[type="text"]:focus { border-color: var(--ide-ac); outline: none; }

.tcx-tfm-hint { margin: 8px 0 0; font-size: 0.75rem; color: var(--ide-text-dim); line-height: 1.4; }

.tcx-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--ide-text-sec); cursor: pointer; margin-top: 16px; line-height: 1.4; }
.tcx-check input { width: 16px; height: 16px; accent-color: var(--ide-ac); margin-top: 2px; cursor: pointer; }
.tcx-check code { font-family: Consolas, "JetBrains Mono", monospace; background: var(--ide-panel-light); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--ide-border); color: var(--ide-text); font-size: 0.8em; }

/* Custom includes (AMXX / SourceMod) */
.tcx-sidebar-includes .tcx-inc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 200px; overflow-y: auto; }
.tcx-inc-row {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--ide-border); border-radius: 8px;
    background: var(--ide-inset); transition: border-color 0.15s, background 0.15s;
}
.tcx-inc-row.tcx-drag { border-color: var(--ide-ac); background: var(--ide-panel-light); }
.tcx-inc-picker {
    flex: 1; display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; cursor: pointer; min-width: 0;
}
.tcx-inc-picker input[type=file] { display: none; }
.tcx-inc-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tcx-inc-name { font-size: 0.8rem; font-weight: 600; color: var(--ide-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcx-inc-hint { font-size: 0.7rem; color: var(--ide-text-dim); }
.tcx-inc-rm {
    width: 32px; height: 32px; margin-right: 8px; flex-shrink: 0;
    border: 1px solid var(--ide-border); border-radius: 6px;
    background: var(--ide-panel); color: var(--ide-text-dim);
    font-size: 1.1rem; line-height: 1; cursor: pointer; font-family: inherit;
}
.tcx-inc-rm:hover { border-color: var(--ide-border-light); color: var(--ide-text); background: var(--ide-panel-light); }
.tcx-add-inc {
    width: 100%; height: 36px; border-radius: 6px;
    border: 1px dashed var(--ide-border-light); background: transparent;
    color: var(--ide-text-sec); font-size: 0.8rem; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit; transition: all 0.15s;
}
.tcx-add-inc:hover { border-color: var(--ide-ac); color: var(--ide-text); background: var(--ide-panel-light); }

/* Build Action */
.tcx-sidebar-action { padding: 24px; margin-top: auto; background: var(--ide-panel); }
.tcx-action-btn {
    width: 100%; height: 50px; border-radius: 8px;
    background: #505c9e; color: #f0f0f4; border: none;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.15s; font-family: inherit; text-transform: uppercase; letter-spacing: 0.5px;
}
.tcx-action-btn:hover:not(:disabled) { background: #5a67b5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(80, 92, 158, 0.3); }
.tcx-action-btn:active:not(:disabled) { transform: translateY(0); }
.tcx-action-btn:disabled { background: var(--ide-panel-light); color: var(--ide-text-dim); border: 1px solid var(--ide-border); cursor: not-allowed; box-shadow: none; }
.tcx-action-btn:disabled svg { opacity: 0.5; }

/* ========================================================
   MAIN AREA (Editor & Dropzone)
   ======================================================== */
.tcx-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--ide-bg); }

/* Editor Panel */
.tcx-editor-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.tcx-source-stack { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.tcx-drop-block { flex-shrink: 0; margin: 12px 12px 0; }
.tcx-drop-label {
    margin: 0 0 8px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ide-text-sec);
}
.tcx-drop-label code {
    font-family: Consolas, "JetBrains Mono", monospace;
    font-size: 0.78rem;
    background: var(--ide-inset);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--ide-border);
    color: var(--ide-text);
    font-weight: 600;
}

.tcx-drop-zone.tcx-drop-compact { flex-shrink: 0; margin: 0; border-radius: 8px; }
.tcx-drop-zone.tcx-drop-compact .tcx-drop-inner { padding: 16px 20px; flex-direction: row; gap: 12px; }
.tcx-drop-zone.tcx-drop-compact .tcx-drop-icon svg { width: 22px; height: 22px; }
.tcx-drop-zone.tcx-drop-compact .tcx-drop-text { font-size: 0.85rem; text-align: left; }

.tcx-editor-bar {
    display: flex; align-items: flex-end; background: var(--ide-panel); 
    padding: 0 16px; height: 46px; border-bottom: 1px solid var(--ide-border);
}

.tcx-editor-tab {
    font-size: 0.85rem; font-family: Consolas, "JetBrains Mono", monospace; color: var(--ide-text);
    background: var(--ide-editor); border: 1px solid var(--ide-border); border-bottom: 1px solid var(--ide-editor); 
    padding: 0 16px; border-radius: 8px 8px 0 0; height: 36px; display: flex; align-items: center; gap: 8px;
    margin-bottom: -1px; position: relative; z-index: 2; border-top: 2px solid var(--ide-ac);
}

.tcx-editor-meta { font-size: 0.75rem; color: var(--ide-text-dim); font-family: Consolas, "JetBrains Mono", monospace; margin-left: auto; margin-bottom: 12px; }

/* Text Editor Area — overlay highlight + transparent textarea (same as AMXX/SourceMod) */
.tcx-editor-shell {
    flex: 1; display: grid; grid-template: 1fr / 1fr;
    background: var(--ide-editor); position: relative; overflow: hidden; z-index: 1;
}

.tcx-editor-hl, .tcx-editor-shell textarea.tcx-editor {
    grid-area: 1 / 1; margin: 0 !important; width: 100% !important; height: 100% !important;
    padding: 20px 24px !important;
    font-family: Consolas, "JetBrains Mono", monospace !important;
    font-size: 0.875rem !important; font-weight: 400 !important; line-height: 1.6 !important;
    letter-spacing: 0px !important; font-style: normal !important;
    font-variant-ligatures: none !important;
    font-kerning: none !important;
    text-rendering: geometricPrecision !important;
    -webkit-text-size-adjust: 100% !important;
    tab-size: 4; -moz-tab-size: 4;
    white-space: pre; overflow-wrap: normal; word-wrap: normal; word-break: normal;
    box-sizing: border-box; border: none; resize: none;
}
.tcx-editor-hl {
    overflow: hidden; pointer-events: none; color: var(--ide-text); background: transparent;
}

.tcx-editor-hl code, .tcx-editor-shell code {
    display: block !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    font-style: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-kerning: inherit !important;
    text-rendering: inherit !important;
    white-space: pre !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: inherit !important;
}

.tcx-editor-shell textarea.tcx-editor {
    overflow: auto; z-index: 2; position: relative;
    background: transparent !important;
    color: transparent !important;
    caret-color: #d4d4d8;
    -webkit-text-fill-color: transparent;
    scrollbar-width: none;
}
.tcx-editor-shell textarea.tcx-editor::-webkit-scrollbar { display: none; }
.tcx-editor-shell textarea.tcx-editor:focus { outline: none; }
.tcx-editor-shell textarea.tcx-editor::selection { background: rgba(101, 116, 205, 0.35); }

.tcx-editor-hl .hl-kw { color: #6ba4e7; }
.tcx-editor-hl .hl-str { color: #58b58e; }
.tcx-editor-hl .hl-com { color: #737885; }
.tcx-editor-hl .hl-pre { color: #4bb1d4; }
.tcx-editor-hl .hl-num { color: #a87df2; }
.tcx-editor-hl .hl-inc { color: #d4a853; }
.tcx-editor-hl span { font-weight: inherit; font-style: inherit; letter-spacing: inherit; font-kerning: inherit; }

.tcx-action-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Project Mode Dropzone */
.tcx-project-area { padding: 32px; overflow-y: auto; height: 100%; box-sizing: border-box; background: var(--ide-bg); }
.tcx-drop-zone {
    border: 1px dashed var(--ide-border-light); border-radius: 12px;
    background: var(--ide-panel); cursor: pointer; transition: all 0.15s;
}
.tcx-drop-zone:hover, .tcx-drop-zone.tcx-drag { border-color: var(--ide-ac); background: var(--ide-panel-light); }
.tcx-drop-inner { padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.tcx-drop-text { margin: 0; font-size: 0.95rem; color: var(--ide-text-sec); }
.tcx-drop-text strong { color: var(--ide-text); font-weight: 700; }
.tcx-upload-link { background: none; border: none; padding: 0; color: var(--ide-ac); cursor: pointer; text-decoration: none; font-weight: 700; }
.tcx-upload-link:hover { text-decoration: underline; color: var(--ide-ac-hover); }

.tcx-project-scan {
    margin-top: 24px; border: 1px solid var(--ide-border); border-radius: 10px;
    background: var(--ide-panel); overflow: hidden;
}
.tcx-project-scan-head {
    display: flex; justify-content: space-between; align-items: center; padding: 14px 20px;
    background: var(--ide-panel-light); border-bottom: 1px solid var(--ide-border);
    font-size: 0.9rem; font-weight: 700; color: var(--ide-text);
}
.tcx-project-clear {
    background: var(--ide-inset); border: 1px solid var(--ide-border); color: var(--ide-text-sec);
    padding: 6px 14px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: 0.15s;
    display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}
.tcx-project-clear:hover { background: var(--ide-panel-light); border-color: var(--ide-border-light); color: var(--ide-text); }
.tcx-project-stats { display: flex; gap: 24px; padding: 14px 20px; font-size: 0.85rem; color: var(--ide-text-sec); border-bottom: 1px solid var(--ide-border); }
.tcx-project-stats strong { color: var(--ide-text); font-weight: 700; }
.tcx-file-tree { padding: 14px 20px; max-height: 350px; overflow: auto; font-family: Consolas, "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--ide-text-sec); line-height: 1.8; background: var(--ide-bg); }
.tcx-tree-proj { color: #6574cd; font-weight: 700; } /* Indigo */
.tcx-tree-cs { color: #4bb1d4; } /* Cyan */
.tcx-tree-dll { color: #a87df2; } /* Purple */

/* ========================================================
   BOTTOM TERMINAL PANE
   ======================================================== */
.tcx-bottom-pane {
    flex-shrink: 0;
    background: var(--ide-bg);
    border-top: 1px solid var(--ide-border);
    display: flex;
    flex-direction: column;
}
.tcx-bottom-pane.is-open {
    height: 220px;
    max-height: 38vh;
}
.tcx-bottom-pane:not(.is-open) .tcx-log,
.tcx-bottom-pane:not(.is-open) .tcx-result-actions {
    display: none;
}
.tcx-terminal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; background: var(--ide-panel); border-bottom: 1px solid var(--ide-border);
    font-size: 0.8rem; font-family: Consolas, "JetBrains Mono", monospace; color: var(--ide-text-sec); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
}
.tcx-result-head {
    display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-family: Consolas, "JetBrains Mono", monospace; text-transform: none; letter-spacing: normal;
}
.tcx-result-head.ok { color: #58b58e; }
.tcx-result-head.err { color: #d97979; }
.tcx-result-head.pending { color: var(--ide-ac); }
.tcx-result-idle { color: var(--ide-text-dim); }

.tcx-log {
    flex: 1; min-height: 0; margin: 0; padding: 16px 20px;
    font-family: Consolas, "JetBrains Mono", monospace; font-size: 0.85rem; line-height: 1.6;
    color: var(--ide-text-sec); overflow: auto; white-space: pre-wrap;
}

/* Post-build Actions */
.tcx-result-actions { display: flex; gap: 14px; padding: 14px 20px; background: var(--ide-panel); border-top: 1px solid var(--ide-border); }
.tcx-result-actions .tcx-action-btn { width: auto; padding: 0 24px; height: 42px; font-size: 0.9rem; text-decoration: none; border-radius: 6px; }
.tcx-result-actions .mgmt-pill {
    height: 42px; padding: 0 20px; font-size: 0.9rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none; background: var(--ide-inset); border: 1px solid var(--ide-border); color: var(--ide-text); border-radius: 6px;
}
.tcx-result-actions .mgmt-pill:hover { background: var(--ide-panel-light); border-color: var(--ide-border-light); color: #fff; }
.page-tools .tcx-result-actions .mgmt-pill svg { color: var(--ic-head) !important; }