:root {
    --bg-main: #0a0a0c;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent: #5e6ad2;
    --accent-glow: rgba(94, 106, 210, 0.4);
    --accent-hover: #7b86e0;
    --text-main: #f0f0f0;
    --text-muted: #8a8a93;
    --highlight-bg: rgba(94, 106, 210, 0.15);
    --highlight-border: rgba(94, 106, 210, 0.5);
    --karaoke-fill: rgba(255, 255, 255, 0.25);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #4ade80;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.header-left,
.header-right {
    flex: 1;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

h1 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-indicator {
    font-size: 0.8rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* File Chooser */
.file-chooser {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.file-chooser .separator {
    color: var(--text-muted);
    opacity: 0.3;
}

select,
.form-select {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 6px;
    font-family: inherit;
    outline: none;
    max-width: 220px;
}

select option {
    background: #1a1a1f;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-select {
    width: 100%;
    padding: 0.65rem 0.75rem;
}

/* Panes */
.panes {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 1.5rem;
    padding: 1.5rem;
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.speaker-pane {
    flex: 0 0 260px;
    max-width: 260px;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.pane h2 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pane h2 span {
    color: white;
    margin-left: 0.25rem;
}

.pane h2 .log-label {
    color: #fca5a5;
}

.pane-nav {
    display: flex;
    gap: 0.25rem;
}

/* V2.2 FIX012: Download buttons in pane headers */
.pane-download-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: all 0.2s;
}

.pane-download-btn:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
}

.pane-download-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* V2.2 AUDIT-19: Inline notification toasts */
.inline-notification {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.5rem 0;
    animation: fadeInOut 3s ease forwards;
}

.inline-notification.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.inline-notification.success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid #4ade80;
    color: #4ade80;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.nav-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    font-family: monospace;
}

.scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scroll-behavior: smooth;
    position: relative;
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* SRT Blocks & Karaoke */
.srt-block {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.srt-block.active,
.log-entry.active {
    background: var(--highlight-bg);
    border-color: var(--highlight-border);
    box-shadow: 0 0 15px var(--accent-glow);
}

.srt-block-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.srt-block-time,
.log-time {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: monospace;
}

.speaker-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.superimposed-correction {
    margin-top: 0.75rem;
    padding-left: 0.75rem;
    border-left: 3px solid #fca5a5;
    color: #fca5a5;
    font-size: 0.9rem;
    background: rgba(255, 0, 0, 0.05);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
}

.sim-time {
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-right: 0.5rem;
}

/* Karaoke Text Setup */
.srt-block-text {
    font-size: 1rem;
    line-height: 1.25;
    position: relative;
    display: inline-block;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.karaoke-lyric {
    background-image: linear-gradient(90deg, var(--text-muted) 100%, var(--text-muted) 100%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: pre-wrap;
    word-break: break-word;
}

.srt-block.active .srt-block-text .karaoke-lyric {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.4) 100%, rgba(255, 255, 255, 0.4) 100%);
}

/* Correction Log Specific */
.log-entry {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
}

.log-time {
    color: #fca5a5;
    margin-bottom: 0.25rem;
}

.log-text {
    font-size: 1rem;
    line-height: 1.5;
}

/* Inline Edit/Delete Icons */
.inline-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.srt-block:hover .inline-actions,
.log-entry:hover .inline-actions {
    opacity: 1;
}

.inline-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.inline-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.inline-action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Inline edit textarea within block */
.inline-edit-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--accent);
    color: white;
    border-radius: 6px;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    min-height: 60px;
    margin-top: 0.5rem;
}

.inline-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.inline-edit-actions button {
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.save-edit-btn {
    background: var(--accent);
    color: white;
}

.cancel-edit-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color) !important;
}

/* Correction Area */
.correction-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.timestamp-preview {
    font-family: monospace;
    font-size: 0.8rem;
    color: #fca5a5;
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    min-height: 80px;
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

textarea:disabled {
    cursor: not-allowed;
}

/* Bottom Player */
.player-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 12, 0.9);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.play-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-width: 100px;
    transition: all 0.2s;
}

.play-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.danger-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.time-display {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: var(--accent);
    border-radius: 3px;
    pointer-events: none;
    z-index: 1;
    width: 0%;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* V2.0 Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================
   V2.1B FILE BROWSER STYLES
   ============================================================ */

.file-browser-pane {
    background: var(--bg-panel);
}

.fb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.fb-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.fb-toolbar {
    display: flex;
    gap: 0.5rem;
}

.fb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb-item {
    cursor: pointer;
    color: var(--accent);
    transition: color 0.15s;
}

.breadcrumb-item:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 0.15rem;
}

.fb-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

.fb-grid::-webkit-scrollbar {
    width: 6px;
}

.fb-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Upload progress bar */
.fb-upload-progress {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(99, 102, 241, 0.07);
}

.fb-upload-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.fb-upload-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.25s ease;
    width: 0%;
}

.fb-upload-progress-fill.indeterminate {
    width: 35% !important;
    animation: upload-slide 1.4s ease-in-out infinite;
}

@keyframes upload-slide {
    0%   { transform: translateX(-200%); }
    100% { transform: translateX(450%); }
}

.fb-upload-progress-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.file-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    position: relative;
    min-height: 100px;
    justify-content: center;
}

.file-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.file-card.selected {
    border-color: var(--accent);
    background: var(--highlight-bg);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* MP3 selected for transcription via double-click in file browser */
.file-card.transcribe-selected {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.07);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.transcribe-badge {
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    transform: translateX(-50%);
    background: #4ade80;
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.file-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.file-card-name {
    font-size: 0.75rem;
    color: var(--text-main);
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
}

.file-card-size {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Inline rename input on file card */
.file-card-rename-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--accent);
    color: white;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: inherit;
    outline: none;
    text-align: center;
}

/* ============================================================
   FILE BROWSER LIST VIEW (FIX022)
   ============================================================ */

.fb-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fb-grid.list-view .file-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-height: unset;
    padding: 0.4rem 0.75rem;
    gap: 0.6rem;
    border-radius: 4px;
}

.fb-grid.list-view .file-card-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.fb-grid.list-view .file-card-name {
    flex: 1;
    font-size: 0.8rem;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-grid.list-view .file-card-size {
    font-size: 0.7rem;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

.fb-grid.list-view .file-card-rename-input {
    text-align: left;
}

.fb-grid.list-view .transcribe-badge {
    position: static;
    transform: none;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* View toggle button active state */
#fb-view-toggle {
    font-size: 0.85rem;
    min-width: 2rem;
}

/* ============================================================
   V2.5A: INLINE FILE VIEWER STYLES
   ============================================================ */

/* Active file card when viewer is open */
.file-card.viewer-active {
    border-color: var(--accent);
    background: var(--highlight-bg);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* The viewer card container — appended directly to #transcribe-tab (flex column) */
.fb-file-viewer {
    background: #0d1117;
    border-top: 2px solid var(--accent);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    max-height: 60vh;
    min-height: 200px;
    overflow: hidden;
    box-shadow: 0 -4px 24px rgba(94, 106, 210, 0.12);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 10;
}

/* Windowed mode — viewer is inline card under file list inside fb-grid */
.fb-file-viewer.viewer-windowed {
    border: 1px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(94, 106, 210, 0.15);
    max-height: 50vh;
    grid-column: 1 / -1;
}

/* Viewer header */
.fb-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(94, 106, 210, 0.1);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Left group: filename + wrap toggle */
.fb-viewer-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.fb-viewer-filename {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.fb-viewer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    transition: color 0.15s;
}

.fb-viewer-close:hover {
    color: #fca5a5;
}

/* Wrap toggle checkbox in viewer header */
.fb-viewer-wrap-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    white-space: nowrap;
}

.fb-viewer-wrap-toggle input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
    margin: 0;
}

.fb-viewer-wrap-toggle:hover {
    color: var(--text-main);
}

/* Viewer body (scrollable content area) */
.fb-viewer-body {
    flex: 1;
    overflow: auto;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
}

.fb-viewer-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fb-viewer-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.fb-viewer-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.fb-viewer-error {
    padding: 1rem;
    color: #fca5a5;
    text-align: center;
}

.fb-viewer-truncated {
    padding: 0.4rem 0.75rem;
    background: rgba(255, 160, 0, 0.1);
    color: #fbbf24;
    font-size: 0.72rem;
    border-bottom: 1px solid rgba(255, 160, 0, 0.2);
}

.fb-viewer-content {
    min-width: fit-content;
}

/* Line-numbered table */
.fb-viewer-table {
    border-collapse: collapse;
    width: 100%;
    min-width: fit-content;
}

.fb-viewer-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.fb-line-num {
    color: rgba(255, 255, 255, 0.2);
    text-align: right;
    padding: 0 0.75rem 0 0.5rem;
    user-select: none;
    white-space: nowrap;
    vertical-align: top;
    min-width: 2.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.fb-line-code {
    padding: 0 0.5rem 0 0.75rem;
    white-space: pre;
    width: 100%;
}

.fb-line-code pre {
    margin: 0;
    white-space: pre;
    font-family: inherit;
    font-size: inherit;
    color: var(--text-main);
}

/* JSON tree view */
.fb-json-tree {
    padding: 0.25rem 0;
}

.fb-json-line {
    display: flex;
    align-items: baseline;
    min-height: 1.5em;
}

.fb-json-line:hover {
    background: rgba(255, 255, 255, 0.03);
}

.fb-json-line .fb-line-num {
    display: inline-block;
    min-width: 2.5rem;
    padding: 0 0.75rem 0 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.fb-json-line .fb-line-code {
    flex: 1;
    padding: 0 0.5rem 0 0.5rem;
    white-space: pre;
}

.fb-json-toggle {
    display: inline-block;
    width: 1em;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
    text-align: center;
    font-size: 0.65rem;
    transition: color 0.15s;
    vertical-align: middle;
}

.fb-json-toggle:hover {
    color: var(--accent);
}

.fb-json-children {
    /* wrapper for child nodes */
}

.fb-json-collapsed-summary {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.7rem;
}

/* ── Wrap-text mode overrides ── */
.fb-viewer-body.wrap-text .fb-viewer-content {
    min-width: 0;
}

.fb-viewer-body.wrap-text .fb-viewer-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.fb-viewer-body.wrap-text .fb-line-code {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

.fb-viewer-body.wrap-text .fb-line-code pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

.fb-viewer-body.wrap-text .fb-json-line .fb-line-code {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Syntax highlighting colors */
.hl-key { color: #79c0ff; }           /* Cyan — keys, attributes */
.hl-str { color: #a5d6a7; }           /* Green — strings */
.hl-num { color: #ffb74d; }           /* Orange — numbers */
.hl-kw { color: #c792ea; }            /* Purple — keywords, booleans, null */
.hl-cmt { color: #6a737d; }           /* Gray — comments */
.hl-time { color: #ffd54f; }          /* Yellow — timestamps */
.hl-tag { color: #7ee787; }           /* Green — HTML tags */
.hl-punct { color: rgba(255,255,255,0.4); } /* Dim — punctuation */
.hl-err { color: #ff6b6b; font-weight: 700; }   /* Red — errors */
.hl-warn { color: #fbbf24; font-weight: 600; }   /* Yellow — warnings */

/* HTML tree view */
.fb-html-tree {
    padding: 0.25rem 0;
}

/* ============================================================
   V2.1C-FE REPORT STYLES
   ============================================================ */

.report-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.report-table th,
.report-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.report-table th {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.report-table td {
    color: var(--text-main);
}

.cost-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
    margin: 0.75rem 0;
}

.report-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ============================================================
   V2.1D SPEAKER RENAME STYLES
   ============================================================ */

.speaker-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.speaker-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speaker-card-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.speaker-card-input:focus {
    border-color: var(--accent);
}

.speaker-card-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
    align-self: flex-end;
}

.speaker-card-btn:hover {
    background: var(--accent-hover);
}

/* V2.1D: Folder warning */
.folder-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* ============================================================
   V3.0 — Transcribe Audio v3 Styles
   ============================================================ */

.v3-stage {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}

.v3-stage[open] {
    border-color: rgba(94, 106, 210, 0.3);
}

.v3-stage-header {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--accent);
    background: rgba(94, 106, 210, 0.06);
    border-bottom: 1px solid var(--border-color);
    user-select: none;
    list-style: none;
}

.v3-stage-header::-webkit-details-marker {
    display: none;
}

.v3-stage-header::before {
    content: '▶ ';
    font-size: 0.7em;
    transition: transform 0.2s;
    display: inline-block;
}

.v3-stage[open] > .v3-stage-header::before {
    content: '▼ ';
}

.v3-stage-body {
    padding: 12px 14px;
}

.v3-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(94, 106, 210, 0.2);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.v3-info-box {
    background: rgba(94, 106, 210, 0.08);
    border: 1px solid rgba(94, 106, 210, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.v3-timing-validation {
    margin-top: 1rem;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    line-height: 1.8;
}

.v3-timing-validation .v3-check-ok { color: #4ade80; }
.v3-timing-validation .v3-check-warn { color: #fbbf24; }
.v3-timing-validation .v3-check-fail { color: #f87171; }

.v3-continuation-pass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.v3-continuation-pass:last-child {
    border-bottom: none;
}

/* ── V3.1: Slider controls ── */
.v3-slider-row {
    margin-bottom: 8px;
}

.v3-slider-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.v3-slider-value {
    font-family: 'SF Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    min-width: 32px;
    display: inline-block;
}

.v3-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    outline: none;
    cursor: pointer;
}

.v3-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-main);
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.v3-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.v3-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-main);
    cursor: pointer;
}

/* V3.1: Token count display */
.v3-token-warn {
    color: #fbbf24;
    font-weight: 600;
}

.v3-token-ok {
    color: #4ade80;
}

.v3-token-danger {
    color: #f87171;
    font-weight: 600;
}

/* V3.1: API key status */
.v3-key-valid { color: #4ade80; }
.v3-key-invalid { color: #f87171; }
.v3-key-checking { color: var(--text-muted); }

/* ── V3.2 FIX025: Rich Help Popup ── */
.v3-help-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: rgba(0,0,0,0.3);
}

.v3-help-popup {
    position: fixed;
    z-index: 1000;
    width: 380px;
    max-width: 92vw;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-secondary, #1e1e2e);
    border: 1px solid var(--accent, #5e6ad2);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(94,106,210,0.2);
    padding: 0;
    animation: v3HelpFadeIn 0.15s ease-out;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-secondary, #a0a0b0);
}

@keyframes v3HelpFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.v3-help-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(94,106,210,0.08);
    border-radius: 10px 10px 0 0;
}

.v3-help-popup-header h4 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--accent, #5e6ad2);
    font-weight: 600;
}

.v3-help-popup-close {
    background: none;
    border: none;
    color: var(--text-muted, #666);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.v3-help-popup-close:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #fff);
}

.v3-help-popup-body {
    padding: 12px 14px;
}

.v3-help-popup-body p {
    margin: 0 0 8px;
}

.v3-help-row {
    display: flex;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.v3-help-row:last-child {
    border-bottom: none;
}

.v3-help-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #666);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 70px;
    flex-shrink: 0;
    padding-top: 1px;
}

.v3-help-value {
    color: var(--text-secondary, #a0a0b0);
    font-size: 0.82rem;
}

.v3-help-tip {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(74,222,128,0.06);
    border: 1px solid rgba(74,222,128,0.15);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #4ade80;
}

.v3-help-tip::before {
    content: '💡 ';
}

/* ── V3.2 Review B: Pipeline Info ── */
.v3-pipeline-info {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 0.76rem;
    color: var(--text-muted, #666);
    line-height: 1.65;
}

.v3-pipeline-info strong {
    color: var(--text-secondary, #a0a0b0);
    font-size: 0.77rem;
}

.v3-pipeline-info .pipeline-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 0;
}

.v3-pipeline-info .pipeline-item::before {
    content: '⚙';
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ── V3.2 Review C: Dynamic Config Info ── */
.v3-config-info {
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(94,106,210,0.05);
    border-left: 3px solid rgba(94,106,210,0.3);
    border-radius: 0 6px 6px 0;
    font-size: 0.78rem;
    color: var(--text-muted, #666);
    line-height: 1.55;
    transition: all 0.2s ease;
}

/* ══════════════════════════════════════════════════════════════
   V3.3 NEW FEATURES CSS
   ══════════════════════════════════════════════════════════════ */

/* ── D-09: Light Theme ── */
[data-theme="light"] {
    --bg-main: #f5f5f7;
    --bg-panel: rgba(0, 0, 0, 0.02);
    --border-color: rgba(0, 0, 0, 0.1);
    --accent: #4f5bd5;
    --accent-glow: rgba(79, 91, 213, 0.3);
    --accent-hover: #6b75e0;
    --text-main: #1a1a1a;
    --text-muted: #6b6b75;
    --highlight-bg: rgba(79, 91, 213, 0.1);
    --highlight-border: rgba(79, 91, 213, 0.4);
    --karaoke-fill: rgba(0, 0, 0, 0.15);
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #16a34a;
}
[data-theme="light"] .player-bar {
    background: rgba(245, 245, 247, 0.95);
}
[data-theme="light"] .fb-grid {
    background: rgba(0,0,0,0.01);
}
[data-theme="light"] header {
    background: rgba(245, 245, 247, 0.9);
}
[data-theme="light"] .v3-help-popup {
    background: #fff;
    color: #1a1a1a;
}
[data-theme="light"] pre,
[data-theme="light"] code {
    background: rgba(0,0,0,0.04);
}

/* ── E-01: Speed Controls ── */
.speed-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 0.5rem;
}
.speed-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.speed-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.speed-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ── D-04: Keyboard Shortcuts ── */
.shortcuts-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.shortcuts-fab:hover {
    transform: scale(1.1);
}
.shortcuts-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.shortcuts-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: shortcuts-in 0.2s ease;
}
@keyframes shortcuts-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.shortcuts-card h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}
.shortcuts-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}
.shortcuts-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    font-size: 0.85rem;
}
.shortcuts-grid .sc-key {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-main);
    text-align: center;
    min-width: 50px;
}
.shortcuts-grid .sc-desc {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ── D-06: Search Bar ── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
}
.search-bar input[type="text"] {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-main);
    font-size: 0.82rem;
    font-family: inherit;
}
.search-bar #search-count {
    font-size: 0.76rem;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}
mark {
    background: rgba(255, 200, 0, 0.4);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}
mark.search-current {
    background: rgba(255, 200, 0, 0.7);
}

/* ── E-06: Replace Row ── */
.replace-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 6px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
}
.replace-row input[type="text"] {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-main);
    font-size: 0.82rem;
    font-family: inherit;
}

/* ── E-04: Bookmarks/Flags ── */
.flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    opacity: 0.4;
    transition: opacity 0.15s;
}
.flag-btn:hover { opacity: 0.8; }
.flag-btn.flagged {
    opacity: 1;
    color: #ef4444;
}
.srt-block.flagged {
    border-left: 3px solid #ef4444;
}
.srt-block.dimmed {
    opacity: 0.3;
    pointer-events: none;
}
#flag-filter-btn.active {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ── D-01: Progress Bar ── */
.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}
.progress-eta {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* ── D-10: Drag-and-Drop Overlay ── */
.fb-drop-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(94, 106, 210, 0.15);
    border: 2px dashed var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

/* ── D-03: Export Buttons ── */
.export-group {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.export-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.export-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}
.export-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── E-03: SRT Context Menu ── */
.srt-context-menu {
    position: fixed;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 180px;
}
.srt-context-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
}
.srt-context-menu button:hover {
    background: rgba(255,255,255,0.06);
}

/* ── D-05: Speaker Profile Bar ── */
.speaker-profile-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
}
.speaker-profile-bar select {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    padding: 4px 6px;
    font-size: 0.8rem;
    font-family: inherit;
}

/* ── D-08: Quality Score Badge ── */
.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.quality-badge.excellent { background: rgba(74,222,128,0.15); color: #4ade80; }
.quality-badge.good { background: rgba(250,204,21,0.15); color: #facc15; }
.quality-badge.fair { background: rgba(251,146,60,0.15); color: #fb923c; }
.quality-badge.poor { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ── E-02: Merge Diff Preview Modal ── */
.merge-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.merge-modal {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.merge-diff-block {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.6;
}
.merge-diff-block .diff-old {
    color: #ef4444;
    text-decoration: line-through;
}
.merge-diff-block .diff-new {
    color: #4ade80;
}

/* ── E-05: Auto-Save Indicator ── */
.autosave-indicator {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: rgba(74,222,128,0.15);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}
.autosave-indicator.show { opacity: 1; }

/* ── File browser relative positioning for drop overlay ── */
#v3-file-browser-pane { position: relative; }

/* ── V3.4: Time Range & Section Controls ── */
.v3-subsection {
    margin-top: 8px;
}
.v3-subsection label input[type="checkbox"] {
    cursor: pointer;
}
.v3-subsection input[type="text"],
.v3-subsection input[type="number"],
.v3-subsection select {
    font-size: 0.82rem;
}

/* ── V3.4: Search toggle button ── */
#search-toggle-btn {
    font-size: 0.82rem;
    padding: 2px 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
}
#search-toggle-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}