html { font-size: 22px; }
#nav-menu { position: relative; }
#nav-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
}
#nav-btn:hover { background: #3a3a3a; }
#nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    min-width: 140px;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
#nav-dropdown a {
    display: block;
    padding: 8px 14px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
}
#nav-dropdown a:hover { background: #3a3a3a; }
#nav-dropdown a.nav-active { color: #f0b429; font-weight: bold; }

body {
    display: flex;
    font-family: sans-serif;
    overflow: hidden; /* Prevent body scrolling */
    height: 100vh; /* Make body take full viewport height */
    background-color: #1a1a1a;
    color: #e0e0e0;
}
.highlight {
    background-color: #3a2e00;
}
.row-pinned-flash {
    background-color: #1a3a1a !important;
    transition: background-color 0.6s ease;
}
#movie-list-container {
    flex: 1;
    margin-right: 20px;
    overflow-y: auto;
    height: calc(100vh - var(--console-banner-height, 0px));
}
#movie-list-header {
    position: sticky;
    top: 0;
    background-color: #1a1a1a;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}
#movie-list-header h1,
.identify-header-row h1,
#filtered-header h1 {
    margin: 0;
    font-size: 1.4rem;
}
.write-mode-label {
    font-size: 0.85rem;
    color: #aaa;
    cursor: pointer;
    user-select: none;
}
#pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
#pagination-controls button {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 1rem;
}
#pagination-controls button:disabled {
    opacity: 0.3;
    cursor: default;
}
#pagination-controls button:not(:disabled):hover {
    background: #3a3a3a;
}
#page-indicator {
    font-size: 0.9rem;
    color: #aaa;
    min-width: 60px;
    text-align: center;
}
#movie-table {
    width: 100%;
    border-collapse: collapse;
}
#movie-table th, #movie-table td {
    border: 1px solid #3a3a3a;
    padding: 8px;
    text-align: left;
}
#movie-table td.rating-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}
.rating-half {
    font-size: 0.7em;
    vertical-align: 0.4em;
    margin-left: -0.1em;
}
#movie-table td.rating-cell input {
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    font-size: inherit;
    font-family: inherit;
    background: transparent;
    color: inherit;
}
#movie-table th {
    background-color: #2a2a2a;
}
#movie-table tr:hover {
    background-color: #242424;
}
/* List page hover overlay */
/* Shared hover overlay */
#cover-hover-overlay {
    position: fixed;
    top: 0;
    height: 100vh;
    width: calc(100vw - 480px); /* keep in sync with #plot-outline-container width below */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    pointer-events: none;
}
#cover-hover-overlay.left { left: 0; }
#cover-hover-overlay.right { right: 0; }
#cover-hover-img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

#plot-outline-container {
    flex: 0 0 480px; /* keep in sync with calc(100vw - 480px) in #cover-hover-overlay above */
    border-left: 1px solid #3a3a3a;
    overflow-y: auto;
    height: calc(100vh - var(--console-banner-height, 0px));
    background-color: #212121;
}
#plot-image {
    width: 100%;
    height: auto;
    min-height: 480px;
    display: block;
}
#plot-outline {
    padding: 12px 14px;
}
.preview-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #e8e8e8;
    margin-bottom: 2px;
}
.preview-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}
.preview-title-row .preview-title {
    margin-bottom: 0;
}
.preview-save-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    color: #888;
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    line-height: 1;
}
.preview-save-btn:hover {
    color: #e0e0e0;
}
.preview-log-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
}
.preview-log-btn:hover { opacity: 0.8; }
.save-disk { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-save-btn--saving .save-disk,
.match-save-btn--saving .save-disk { display: inline-block; animation: spin 0.7s linear infinite; }
.save-check {
    position: absolute;
    top: -3px;
    right: -2px;
    font-size: 0.55rem;
    color: #4caf50;
    display: none;
    font-weight: bold;
    line-height: 1;
}
.preview-save-btn--saved .save-check,
.match-save-btn--saved .save-check { display: block; }
.match-save-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 2px;
    color: #888;
    position: relative;
    display: inline-block;
    line-height: 1;
}
.match-save-btn:hover { color: #e0e0e0; }
.preview-imdb-link {
    display: inline-block;
    font-size: 0.75rem;
    color: #7eb6ff;
    margin-bottom: 10px;
}
.preview-meta {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 3px;
}
.preview-plot-toggle {
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
    border-top: 1px solid #3a3a3a;
    padding-top: 10px;
    cursor: pointer;
    user-select: none;
}
.preview-plot-toggle:hover {
    color: #c0c0c0;
}
.preview-plot {
    font-size: 0.85rem;
    color: #c0c0c0;
    line-height: 1.5;
    margin-top: 10px;
    border-top: 1px solid #3a3a3a;
    padding-top: 10px;
}
.preview-separator {
    border: none;
    border-top: 1px solid #3a3a3a;
    margin: 10px 0 0;
}
.preview-notes {
    font-size: 0.85rem;
    color: #a0a0a0;
    font-style: italic;
    line-height: 1.5;
    padding-top: 8px;
}
a {
    color: #7eb6ff;
}

.fetch-col, .fetch-cell {
    width: 24px;
    min-width: 24px;
    text-align: center;
    padding: 2px !important;
}
.row-fetch-btn {
    display: none;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 1px 4px;
    border-radius: 3px;
}
.row-fetch-btn:hover:not(:disabled) {
    color: #e0e0e0;
    background: #3a3a3a;
}
.row-fetch-btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.row-sync-btn {
    display: none;
    background: none;
    border: none;
    color: #b8860b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 1px 4px;
    border-radius: 3px;
}
.row-sync-btn:hover {
    color: #ffd050;
    background: #3a3a3a;
}

/* Identify page: overlay takes up half the screen */
body.identify-page #cover-hover-overlay {
    width: 50%;
}

/* Identify page */
body.identify-page {
    display: block;
    overflow: hidden;
    height: 100vh;
}
#identify-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--console-banner-height, 0px));
}
#identify-list-pane {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px;
    min-height: 60px;
}
#identify-table-wrapper {
    flex: 1 1 0;
    overflow-y: auto;
}
#identify-divider {
    flex: 0 0 6px;
    background: #2a2a2a;
    border-top: 1px solid #3a3a3a;
    border-bottom: 1px solid #3a3a3a;
    cursor: row-resize;
    user-select: none;
}
#identify-divider:hover, #identify-divider.dragging {
    background: #4a3a00;
}
#load-more-btn {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}
#load-more-btn:hover:not(:disabled) { background: #3a3a3a; }
#load-more-btn:disabled { opacity: 0.4; cursor: default; }
#identify-table {
    width: 100%;
    border-collapse: collapse;
}
#identify-table th,
#identify-table td {
    border: 1px solid #3a3a3a;
    padding: 6px 8px;
    text-align: left;
}
#identify-table th {
    background-color: #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 1;
}
.identify-row { cursor: pointer; }
.identify-row.highlight {
    background-color: #3a2e00;
}
/* Status column */
th.status-col, td.status-cell {
    width: 24px;
    min-width: 24px;
    text-align: center;
    padding: 0 4px;
}
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}
.status-dot-pending { background: #f0c040; }
.status-dot-success { background: #40c040; }
.status-dot-error   { background: #c04040; }
.status-ready { color: #888; font-size: 0.8rem; }
.status-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #444;
    border-top-color: #aaa;
    border-radius: 50%;
    animation: status-spin 0.8s linear infinite;
    vertical-align: middle;
}
/* Slow spinner for queued (waiting for a worker), fast for actively loading */
.status-spinner-slow { animation-duration: 15s; }
@keyframes status-spin { to { transform: rotate(360deg); } }
#identify-table td:last-child,
#identify-table th:last-child {
    width: 20px;
    text-align: center;
    padding: 4px;
}
#identify-bottom-pane {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px;
}
#match-panels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    flex: 1 1 0;
    overflow: hidden;
}
.match-panel {
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 8px;
    overflow-y: auto;
    background: #212121;
    font-size: 0.85rem;
}
.match-panel-empty {
    background: #1a1a1a;
    border-style: dashed;
}
.match-number {
    font-size: 1.4rem;
    font-weight: bold;
    color: #c0c0c0;
    margin-bottom: 4px;
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    line-height: 1.6em;
    text-align: center;
    border-radius: 50%;
}
.match-number-pending { color: #000; background-color: #f0b429; }
.match-number-success { color: #000; background-color: #4caf50; }
.match-number-error   { color: #000; background-color: #ff5555; }
.match-cover {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    display: block;
    margin-bottom: 4px;
}
.match-no-cover {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8rem;
    border: 1px dashed #444;
    margin-bottom: 4px;
}
.match-title {
    font-weight: bold;
    margin-bottom: 2px;
}
.match-original-title {
    color: #aaa;
    font-style: italic;
    margin-bottom: 2px;
    font-size: 0.85rem;
}
.match-year {
    color: #aaa;
    margin-bottom: 2px;
}
.match-director,
.match-cast,
.detail-director,
.detail-cast {
    padding-left: 10px;
    text-indent: -10px;
}
.match-director,
.match-cast {
    color: #aaa;
    margin-bottom: 2px;
    font-size: 0.8rem;
}
.match-genres {
    color: #888;
    font-style: italic;
    margin-bottom: 4px;
    font-size: 0.8rem;
}
.match-plot {
    color: #c0c0c0;
    margin-bottom: 6px;
    font-size: 0.8rem;
    line-height: 1.3;
}
.match-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.match-imdb-link,
.match-ext-link {
    font-size: 0.8rem;
}
.match-loading,
.match-error {
    color: #777;
    font-style: italic;
    padding: 8px 0;
}
.match-error {
    color: #ff5555;
}
#identify-hint {
    margin: 6px 0 0 0;
    font-size: 0.85rem;
    color: #777;
    text-align: center;
}

/* Filtered page */
#filtered-list-container {
    flex: 1;
    overflow-y: auto;
    height: calc(100vh - var(--console-banner-height, 0px));
}
#filtered-header {
    position: sticky;
    top: 0;
    background-color: #1a1a1a;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0 8px 8px;
}
/* Letter-level grouping (director / actor) */
.letter-section {
    border-bottom: 1px solid #2a2a2a;
}
.letter-section > summary.letter-summary {
    list-style: none;
    padding: 4px 8px;
    background: #1e1e1e;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    color: #888;
}
.letter-section > summary.letter-summary::-webkit-details-marker { display: none; }
.letter-section > summary.letter-summary::before {
    content: '▶';
    font-size: 0.55rem;
    color: #555;
    transition: transform 0.12s;
    flex-shrink: 0;
}
.letter-section[open] > summary.letter-summary::before { transform: rotate(90deg); }
.letter-section > summary.letter-summary:hover { background: #242424; }

/* Name-level grouping (director / actor name, or year) */
.group-section {
    border-bottom: 1px solid #252525;
}
/* Indent group-sections that live inside a letter-section */
.letter-section > .group-section > summary.group-summary {
    padding-left: 20px;
}
.group-section > summary.group-summary {
    list-style: none;
    padding: 6px 8px;
    background: #232323;
    border-bottom: 1px solid #2a2a2a;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    font-size: 0.88rem;
}
.group-section > summary.group-summary::-webkit-details-marker { display: none; }
.group-section > summary.group-summary::before {
    content: '▶';
    font-size: 0.6rem;
    color: #666;
    transition: transform 0.12s;
    flex-shrink: 0;
}
.group-section[open] > summary.group-summary::before { transform: rotate(90deg); }
.group-section > summary.group-summary:hover { background: #2b2b2b; }

.group-count {
    font-size: 0.75rem;
    color: #777;
    font-weight: normal;
}
.group-table {
    width: 100%;
    border-collapse: collapse;
}
.group-table td {
    border: 1px solid #252525;
    padding: 5px 8px;
    text-align: left;
    font-size: 0.88rem;
}
.group-table .movie-row { cursor: pointer; }
.group-table .movie-row:hover { background: #242424; }
.group-table .movie-row.highlight { background: #3a2e00; }
.group-table .rating-cell {
    width: 44px;
    min-width: 44px;
    white-space: nowrap;
}
.watched-cell {
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Keyboard shortcuts help popup */
#help-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
#help-popup.open { display: flex; }
#help-popup-dialog {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 20px 28px 24px;
    min-width: 300px;
    max-width: 90vw;
    color: #e0e0e0;
}
#help-popup-dialog h2 {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#help-popup-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
}
#help-popup-close:hover { color: #e0e0e0; }
#help-popup-dialog table { border-collapse: collapse; width: 100%; }
#help-popup-dialog td { padding: 3px 6px; vertical-align: top; }
#help-popup-dialog td:first-child {
    font-family: monospace;
    color: #f0c040;
    white-space: nowrap;
    text-align: right;
    padding-right: 14px;
    min-width: 80px;
}
#help-popup-dialog td:last-child { color: #ccc; }

/* Keyboard navigation focus indicator */
.nav-item.nav-focus {
    outline: 1px solid #5a5030;
    outline-offset: -1px;
}
.letter-summary.nav-focus  { background: #242018 !important; }
.group-summary.nav-focus   { background: #2e2a1a !important; }
.movie-row.nav-focus       { background: #3a2e00 !important; }

/* ── Warning banners ────────────────────────────────────────────────────── */
.missing-zid-warning {
    background: #fff3cd;
    border: 1px solid #b8860b;
    padding: 8px 12px;
    margin-bottom: 8px;
    color: #7a5800;
}
.duplicate-warning {
    background: #ffe0e0;
    border: 1px solid #c00;
    padding: 8px 12px;
    margin-bottom: 8px;
    color: #900;
}
.warning-item { margin-top: 4px; }
.warning-group { margin-top: 6px; }
.warning-actions { margin-top: 8px; }
.warning-fix-btn {
    background: #7a5800;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.85rem;
}
.warning-status { margin-left: 8px; font-size: 0.85rem; }

/* ── Shared header controls ─────────────────────────────────────────────── */
#search-input {
    padding: 4px 8px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 220px;
}
#movie-table th[data-column] { cursor: pointer; }
.header-action-btn {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ── Browse page ────────────────────────────────────────────────────────── */
#problems-btn {
    display: none;
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
}
#fetch-all-btn { display: none; }
tr[data-unidentified="y"] { display: none; }

/* ── Modal overlays (shared) ────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#problems-modal { z-index: 1100; }
.modal-dialog {
    background: #2a2a2a;
    border: 1px solid #555;
    padding: 20px;
    min-width: 360px;
    max-width: 90vw;
    border-radius: 4px;
}
#problems-modal .modal-dialog { border-color: #c00; width: 480px; min-width: 0; }
#confirm-modal .modal-dialog  { min-width: 380px; }
#manual-modal .modal-dialog   { min-width: 420px; }
#sync-modal .modal-dialog     { min-width: 520px; max-height: 80vh; overflow-y: auto; }

/* modal content elements */
.modal-heading { margin: 0 0 12px; color: #e0e0e0; font-weight: bold; }
#sync-modal   .modal-heading { margin-bottom: 6px; }
#manual-modal .modal-heading { margin-bottom: 8px; }
.modal-sub  { margin: 0 0 10px; color: #aaa; font-size: 0.85rem; }
.modal-body { margin-bottom: 16px; color: #ccc; font-size: 0.9rem; line-height: 1.7; }
.modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
#manual-modal   .modal-actions { margin-top: 10px; }
#sync-modal     .modal-actions { margin-top: 14px; }
#problems-modal .modal-actions { margin-top: 0; }
.modal-status { color: #aaa; font-size: 0.85rem; }
.modal-form-grid {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 8px 12px;
    align-items: center;
}
.modal-form-label { color: #aaa; font-size: 0.9rem; }
.modal-form-input {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 5px 8px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}
.modal-form-title { color: #e0e0e0; font-size: 0.95rem; }
.modal-full-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    background: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 0.95rem;
}

/* ── Problems modal ─────────────────────────────────────────────────────── */
#problems-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
#problems-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
}
#problems-close-btn:hover { color: #e0e0e0; }
#problems-counter { margin: 0; color: #aaa; font-size: 0.85rem; }
#problems-type    { margin: 0 0 12px; color: #e0e0e0; font-weight: bold; font-size: 1rem; }
#problems-body .problem-movie-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ── Sync modal table ───────────────────────────────────────────────────── */
#sync-modal-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.sync-modal-header { color: #888; border-bottom: 1px solid #444; }
.sync-modal-th      { text-align: left; padding: 4px 8px; }
.sync-modal-th-icon { padding: 4px; }

/* ── Confirm modal ──────────────────────────────────────────────────────── */
#confirm-heading    { margin: 0 0 10px; color: #e0e0e0; font-weight: bold; }
#confirm-movie-info { margin-bottom: 12px; color: #ccc; font-size: 0.9rem; line-height: 1.5; }
#confirm-actions    { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* ── Identify page header ───────────────────────────────────────────────── */
.identify-header-row { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
#identify-pagination { display: flex; align-items: center; gap: 8px; }
#identify-pagination button {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 1rem;
}
#identify-pagination button:disabled { opacity: 0.3; cursor: default; }
#identify-pagination button:not(:disabled):hover { background: #3a3a3a; }
#identify-page-indicator { font-size: 0.9rem; color: #aaa; min-width: 60px; text-align: center; }
#identify-search-input {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.9rem;
    width: 160px;
}
.search-source-label { font-size: 0.85rem; color: #aaa; }
#search-source-select {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
}

/* ── Filtered page ──────────────────────────────────────────────────────── */
.filtered-control-label { font-size: 0.85rem; color: #aaa; }
#sort-label { white-space: nowrap; }
.header-select {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
}
#filtered-search-input {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.85rem;
    width: 160px;
    display: none;
}
#filtered-status { font-size: 0.85rem; color: #888; }

/* Top progress bar */
#page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: #f0b429;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}

/* Settings page */
#settings-container { display: flex; flex-direction: column; width: 100%; height: 100vh; overflow: hidden; }
#settings-header { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #3a3a3a; flex-shrink: 0; }
#settings-title { margin: 0; font-size: 1.1rem; color: #e0e0e0; }
#settings-content { padding: 24px 32px; overflow-y: auto; }
.settings-section { margin-bottom: 32px; }
.settings-section h2 { font-size: 0.9rem; color: #888; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px 0; border-bottom: 1px solid #2a2a2a; padding-bottom: 6px; }
.settings-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; }
.settings-label { color: #888; font-size: 0.85rem; min-width: 160px; flex-shrink: 0; }
.settings-value { color: #e0e0e0; font-size: 0.85rem; }
.settings-mono { font-family: monospace; font-size: 0.8rem; color: #b0b0b0; }
#sheet-value a { color: #f0b429; text-decoration: none; font-size: 0.85rem; }
#sheet-value a:hover { text-decoration: underline; }
