/* Terminal/Retro Theme - Coco Orange Phosphor */
:root {
    /* Coco Orange Phosphor Palette */
    --bg-primary: #0a0806;
    --bg-secondary: #120e0a;
    --bg-card: #1a1410;
    --border-color: rgba(240, 160, 96, 0.3);
    --text-primary: #f0d0b0;
    --text-secondary: #d0b090;
    --text-muted: #806040;
    --accent-blue: #f0a060;
    --accent-green: #c0a060;
    --accent-orange: #e07840;
    --accent-red: #d06040;
    --shadow: rgba(240, 160, 96, 0.15);
    --font-mono: 'IBM Plex Mono', monospace;
    --font-display: 'VT323', monospace;
}

/* Dark mode same as terminal theme */
:root[data-theme="dark"] {
    --bg-primary: #0a0806;
    --bg-secondary: #120e0a;
    --bg-card: #1a1410;
    --border-color: rgba(240, 160, 96, 0.3);
    --text-primary: #f0d0b0;
    --text-secondary: #d0b090;
    --text-muted: #806040;
    --accent-blue: #f0a060;
    --accent-green: #c0a060;
    --accent-orange: #e07840;
    --accent-red: #d06040;
    --shadow: rgba(240, 160, 96, 0.15);
}

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

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 20px;
    letter-spacing: 0.02em;
    position: relative;
    font-size: 16px;
}

/* CRT Scanline Effect */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    opacity: 0.12;
}

/* CRT Vignette Effect */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.banner-container {
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 0;
}

.banner-container svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* Terminal Header Styles */
.terminal-header {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
}

.terminal-banner-top {
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: var(--accent-orange);
    width: 100%;
    box-shadow: 0 0 8px rgba(240, 160, 96, 0.4);
}

.terminal-title {
    margin-bottom: 12px;
}

.terminal-title h1 {
    font-family: 'VT323', monospace;
    font-size: 42px;
    color: var(--accent-orange);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.terminal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.terminal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.feature-pill {
    color: var(--text-muted);
    font-size: 13px;
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    letter-spacing: 0.05em;
}

.terminal-status-line {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.terminal-status-line .status-ok {
    color: var(--accent-green);
}

/* Phosphor glow utility */
.phosphor-glow {
    text-shadow: 0 0 4px rgba(240, 160, 96, 0.4), 0 0 8px rgba(240, 160, 96, 0.2);
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.controls-grid .summary-card {
    display: flex;
    flex-direction: column;
}

.controls-grid select {
    width: 100%;
    margin-top: 4px;
}

.controls-grid .source-path {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    word-break: break-all;
    text-align: center;
}

.controls-grid .repo-link {
    margin-top: 6px;
    text-align: center;
}

.controls-grid .repo-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 15px;
}

.controls-grid .repo-link a:hover {
    text-decoration: underline;
}

.controls-grid .branch-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 4px 0;
}

.controls-grid .branch-display .branch-line {
    display: block;
    text-align: center;
}

.controls-grid .branch-display .branch-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.controls-grid .branch-display .branch-behind {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.controls-grid .branch-display .branch-count {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.controls-grid .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.controls-grid .action-buttons .action-btn {
    width: 100%;
    text-align: center;
}

.warning-banner {
    background: var(--accent-red);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.warning-banner.visible {
    display: block;
}

.warning-banner h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.warning-banner ul {
    list-style: none;
    padding-left: 0;
}

.warning-banner li {
    padding: 4px 0;
    font-size: 16px;
}

.warning-banner li:before {
    content: "⚠ ";
    margin-right: 8px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
}

.summary-card h3 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 500;
}

.summary-card .value {
    font-size: 32px;
    font-weight: 600;
    color: var(--accent-orange);
    margin-bottom: 4px;
    text-shadow: 0 0 8px rgba(240, 160, 96, 0.3);
}

.summary-card .label {
    font-size: 13px;
    color: var(--text-muted);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
}

.chart-card h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chart-container {
    position: relative;
    height: 300px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 18px;
}

.error {
    background: var(--accent-red);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 16px;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
}

/* Select dropdown terminal styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'IBM Plex Mono', monospace;
    padding: 8px 28px 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e07840' d='M2 4l4 4 4-4' stroke='%23e07840' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 8px rgba(224, 120, 64, 0.3);
}

select:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 12px rgba(224, 120, 64, 0.4);
}

select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: 'IBM Plex Mono', monospace;
}

select option:hover,
select option:checked {
    background: var(--accent-orange);
    color: var(--bg-primary);
}

.action-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'IBM Plex Mono', monospace;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 0 8px rgba(240, 160, 96, 0.3);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.danger {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.action-btn.danger:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 8px rgba(208, 96, 64, 0.3);
}

.status-banner {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    display: none;
}

.status-banner.visible {
    display: block;
}

.status-banner.info {
    background: var(--accent-blue);
    color: white;
}

.status-banner.success {
    background: var(--accent-green);
    color: white;
}

.status-banner.error {
    background: var(--accent-red);
    color: white;
}

.not-indexed-banner {
    background: var(--accent-orange);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.not-indexed-banner h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.not-indexed-banner p {
    font-size: 16px;
    margin-top: 6px;
}

.not-indexed-banner code {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

.parse-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}

.parse-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.parse-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
}

.parse-table tr:hover td {
    background: var(--bg-secondary);
}

.parse-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.status-ok { color: var(--accent-green); }
.status-partial { color: var(--accent-orange); }
.status-error { color: var(--accent-red); }
.status-no-grammar { color: var(--text-muted); }

.parse-details {
    margin-top: 16px;
}

.parse-details summary {
    cursor: pointer;
    padding: 10px 0;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 16px;
    list-style: none;
}

.parse-details summary::-webkit-details-marker {
    display: none;
}

.parse-details summary::before {
    content: "\25B6\00a0";
    font-size: 11px;
}

.parse-details[open] summary::before {
    content: "\25BC\00a0";
}

.failure-list {
    margin-top: 8px;
}

.failure-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.failure-list th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.failure-list td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    word-break: break-all;
}

.failure-list tr:hover td {
    background: var(--bg-secondary);
}

.failure-list .file-path {
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-primary);
}

.failure-list .error-msg {
    color: var(--text-secondary);
    font-size: 12px;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expandable-row {
    cursor: pointer;
}

.expandable-row td:first-child::before {
    content: "\25B6\00a0";
    font-size: 10px;
    display: inline-block;
    transition: transform 0.15s;
}

.expandable-row.expanded td:first-child::before {
    transform: rotate(90deg);
}

.detail-row {
    display: none;
}

.detail-row.visible {
    display: table-row;
}

.detail-row td {
    padding: 0 12px 12px 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.detail-row .failure-list {
    margin-top: 0;
}

/* Search section */
.search-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: none;
}

.search-section h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'IBM Plex Mono', monospace;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input[type="text"]:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 4px rgba(240, 160, 96, 0.2);
}

.search-bar input[type="text"]::placeholder {
    color: var(--text-muted);
}

.search-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.search-filters label {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'IBM Plex Mono', monospace;
}

.search-filters select {
    padding: 4px 24px 4px 8px;
    font-size: 13px;
    background-position: right 6px center;
    background-size: 10px 10px;
}

.search-advanced {
    margin-top: 8px;
}

.search-advanced summary {
    cursor: pointer;
    font-size: 15px;
    color: var(--text-secondary);
    list-style: none;
    user-select: none;
}

.search-advanced summary::-webkit-details-marker {
    display: none;
}

.search-advanced summary::before {
    content: "\25B6\00a0";
    font-size: 10px;
}

.search-advanced[open] summary::before {
    content: "\25BC\00a0";
}

.search-advanced-content {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.search-advanced-content label {
    font-size: 15px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-advanced-content input[type="range"] {
    width: 100px;
}

.search-advanced-content input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
}

.search-results-area {
    margin-top: 16px;
}

.search-results-info {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.search-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    display: none;
}

.search-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 16px;
    display: none;
}

.search-error {
    background: var(--accent-red);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 16px;
    display: none;
}

.search-result-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.search-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.search-result-path {
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 500;
    word-break: break-all;
}

.search-result-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.search-result-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-score-high { background: var(--accent-green); color: white; }
.badge-score-mid { background: var(--accent-orange); color: white; }
.badge-score-low { background: var(--text-muted); color: white; }
.badge-match { background: var(--accent-blue); color: white; }
.badge-lang { background: var(--border-color); color: var(--text-primary); }

.search-result-symbol {
    padding: 6px 14px;
    font-size: 15px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
}

.search-result-code {
    padding: 12px 14px;
    background: var(--bg-card);
    overflow-x: auto;
}

.search-result-code pre {
    margin: 0;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
}

.search-result-code .expand-btn {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--accent-blue);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.search-result-code .expand-btn:hover {
    text-decoration: underline;
}

.search-result-actions {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.search-result-actions button {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-actions button:hover {
    background: var(--bg-secondary);
}

/* Clickable file path */
.search-result-path.clickable {
    cursor: pointer;
    transition: color 0.15s;
}

.search-result-path.clickable:hover {
    text-decoration: underline;
}

.search-result-path.clickable.copied {
    color: var(--accent-green);
}

/* File viewer modal */
.file-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.file-modal-backdrop.visible {
    display: flex;
}

.file-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 90vw;
    height: 85vh;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.file-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.file-modal-header .file-info {
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    color: var(--accent-blue);
    word-break: break-all;
}

.file-modal-header .file-info .line-count {
    color: var(--text-muted);
    font-size: 14px;
    margin-left: 12px;
}

.file-modal-close {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 10px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 12px;
}

.file-modal-close:hover {
    background: var(--bg-secondary);
}

.file-modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.file-modal-body pre {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 0;
    background: var(--bg-card) !important;
}

.file-modal-body pre code {
    background: none !important;
}

.file-modal-body .line-highlight {
    background: rgba(255, 200, 50, 0.15) !important;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--accent-red);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.toast.visible {
    opacity: 1;
}

@media (max-width: 768px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Log Panel */
.log-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}
.log-panel.open { right: 0; }

.log-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.log-panel-header h3 {
    font-family: var(--font-display);
    color: var(--accent-orange);
    font-size: 20px;
    margin: 0;
}
.log-panel-header .log-header-btns {
    display: flex;
    gap: 8px;
}
.log-panel-header button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
}
.log-panel-header button:hover {
    color: var(--text-primary);
    border-color: var(--accent-orange);
}

.log-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.55;
}
.log-line {
    white-space: pre-wrap;
    word-break: break-all;
    padding: 1px 0;
}
.log-ts { color: var(--text-muted); }
.log-name { color: var(--text-muted); }
.log-level-DEBUG { color: var(--text-muted); }
.log-level-INFO { color: var(--accent-green); }
.log-level-WARNING { color: #e0a040; }
.log-level-ERROR { color: var(--accent-red); }
.log-level-CRITICAL { color: var(--accent-red); font-weight: 700; }
.log-level-STDERR { color: var(--text-secondary); font-style: italic; }

.log-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.log-scroll-indicator {
    color: var(--accent-orange);
    cursor: pointer;
    display: none;
}
.log-scroll-indicator.visible { display: inline; }

/* LOGS button in status line */
.logs-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 1px 8px;
    cursor: pointer;
    position: relative;
}
.logs-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-orange);
}
.log-badge {
    display: none;
    position: absolute;
    top: -3px;
    right: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
}
.log-badge.active { display: block; }

@media (max-width: 768px) {
    .log-panel {
        width: 100%;
        right: -100%;
    }
}

/* Dependency badges on search results */
.dep-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.dep-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    border: 1px solid transparent;
}

.dep-badge:hover {
    opacity: 0.85;
}

.dep-badge-imports {
    background: rgba(224, 120, 64, 0.2);
    color: var(--accent-orange);
    border-color: rgba(224, 120, 64, 0.3);
}

.dep-badge-dependents {
    background: rgba(100, 160, 220, 0.2);
    color: rgb(100, 160, 220);
    border-color: rgba(100, 160, 220, 0.3);
}

.dep-badge-zero {
    opacity: 0.35;
    cursor: default;
}

.dep-badge-zero:hover {
    opacity: 0.35;
}

/* Expandable dependency panel in search results */
.search-result-deps {
    display: none;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 13px;
}

.search-result-deps.visible {
    display: block;
}

.deps-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.deps-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.deps-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.deps-file-list li {
    padding: 2px 0;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deps-overflow { display: none; }
.deps-overflow.visible { display: contents; }
.deps-show-more { cursor: pointer; color: var(--accent-blue); }
.deps-show-more:hover { text-decoration: underline; }

.dep-type-tag {
    display: inline-block;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(240, 160, 96, 0.15);
    color: var(--text-muted);
    margin-right: 4px;
}

.deps-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.deps-actions button {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.deps-actions button:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* Dependency graph modal */
.deps-graph-modal {
    width: 92vw;
    height: 88vh;
    max-width: 1400px;
}

.deps-graph-body {
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

.deps-graph-body svg {
    display: block;
    width: 100%;
    height: 100%;
}

.deps-depth-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 16px;
}

.deps-depth-label select {
    padding: 2px 20px 2px 6px;
    font-size: 12px;
    background-position: right 4px center;
    background-size: 10px 10px;
}

/* D3 graph node/edge styles */
.deps-graph-body .node circle {
    stroke: var(--border-color);
    stroke-width: 1.5;
    fill: var(--bg-card);
}

.deps-graph-body .node.root circle {
    fill: var(--accent-orange);
    stroke: var(--accent-orange);
}

.deps-graph-body .node text {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--text-secondary);
}

.deps-graph-body .node.root text {
    fill: var(--text-primary);
    font-weight: 600;
}

.deps-graph-body .node.external circle {
    fill: var(--bg-secondary);
    stroke: var(--text-muted);
    stroke-dasharray: 2 2;
    opacity: 0.5;
}

.deps-graph-body .node.external text {
    fill: var(--text-muted);
    font-style: italic;
}

.deps-graph-body .link {
    stroke: var(--border-color);
    stroke-width: 1.2;
    fill: none;
}

.deps-graph-body .link.reverse {
    stroke: rgba(100, 160, 220, 0.5);
    stroke-dasharray: 5 3;
}

.deps-graph-body .link-label {
    font-family: var(--font-mono);
    font-size: 9px;
    fill: var(--text-muted);
}

@media (max-width: 768px) {
    .deps-columns {
        grid-template-columns: 1fr;
    }

    .deps-graph-modal {
        width: 98vw;
        height: 92vh;
    }
}
