:root {
    --status-verified: #2ecc40;
    --status-good: #0074d9;
    --status-questionable: #ffdc00;
    --status-bad: #ff4136;
    --nav-bar-height: 36px;
    --logo-height: 40px;
    --pico-muted-border-color: rgb(243, 244, 247);
}

a {
    text-decoration: none;
    color: #035c90;
}
a:hover {
    text-decoration: underline;
}

html {
    font-size: 96%;
}

button,
[type="submit"],
[role="button"] {
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
}

.container {
    max-width: 100% !important;
    padding-left: 2rem;
    padding-right: 2rem;
}

main.container {
    padding-top: 0rem;
    padding-bottom: 0.15rem;
    margin-top: -0.75rem;
}
main.container > *:first-child {
    margin-top: 0 !important;
}

main > h3 {
    font-size: 1.22rem;
}


/* Flag icons — sized to match font height */
.flag-icon {
    height: 1.1em;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0 1px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Status dots */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}
.status-dot.verified { background: var(--status-verified); }
.status-dot.unverified { background: var(--status-good); }
.status-dot.questionable { background: var(--status-questionable); }
.status-dot.bad { background: var(--status-bad); }

/* Scrollable table container with sticky header */
/* Compact tables for disc listing */
.disc-table {
    width: 100%;
}

/* Reusable horizontal scroll wrapper for tables */
.table-scroll {
    overflow-x: auto;
}

/* Keep specific tables content-width instead of full width */
.table-scroll-compact > table {
    display: inline-table;
    width: max-content;
    max-width: none;
}

/* Compact standalone tables without a scroll wrapper */
.table-compact {
    display: inline-table;
    width: max-content;
    max-width: none;
}

.table-nowrap th,
.table-nowrap td {
    white-space: nowrap;
}
.disc-table td, .disc-table th {
    padding: 0.08rem 0.5rem;
    font-size: 0.75rem;
    vertical-align: middle;
}
.disc-table td a {
    text-decoration: none;
}
.disc-table td a:hover {
    text-decoration: underline;
}
.disc-table .title-col a {
    color: inherit;
}
[data-theme="dark"] .disc-table .title-col a {
    color: #EFFFFF;
}

/* Merge flags in region and language columns */
.disc-table .region-col .flag-icon,
.disc-table .language-col .flag-icon {
    margin: 0 -1px 0 0;
}

/* Keep language flags compact but not touching */
.disc-table .language-col .flag-icon {
    margin-right: 1px;
}

/* Shrink-to-fit columns: dumped-by-me, region, system, status */
.disc-table .dumped-by-me-col,
.disc-table .region-col,
.disc-table .system-col,
.disc-table .status-col {
    width: 1%;
    white-space: nowrap;
}

.disc-table .dumped-by-me-col,
.disc-table .region-col,
.disc-table .language-col,
.disc-table .status-col {
    text-align: center;
}

.disc-table .dumped-by-me-yes {
    color: #2e7d32;
    font-weight: 600;
}

.disc-table .dumped-by-me-no {
    color: #c62828;
    font-weight: 600;
}

/* Ellipsis truncation for Edition and Serial */
.disc-table .truncate {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Striped table rows — matches home page alternating row style */
table.striped tbody tr:nth-child(odd) td {
    background-color: #F5F9FC !important;
}
table.striped th,
table.striped td {
    border-bottom: none !important;
}

/* Hide "Filters" summary label */
.filter-details > summary {
    display: none;
}

/* About page */
.about-page-title {
    text-align: center;
}
.about-qa {
    max-width: 750px;
    margin: 0 auto;
}
.qa-item {
    margin-bottom: 1.5rem;
}
.qa-question {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    text-align: center;
    color: #565e6a;
}
[data-theme="dark"] .qa-question {
    color: #c2c7d0;
}
.qa-answer {
    font-size: 0.8rem;
    margin-bottom: 0;
}
.qa-answer li {
    font-size: 0.8rem;
}

/* Downloads page heading and description */
.downloads-page-title {
    text-align: center;
}
.downloads-page-desc {
    font-size: 0.8rem;
    text-align: center;
}

/* Downloads table — same width as home page recent dumps */
.downloads-table {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

/* Downloads table — font sizes and colors match home page recent dumps */
.downloads-table th {
    padding: 0.08rem 0.5rem;
    font-size: 0.9rem;
    text-align: left;
    color: #565e6a;
}
.downloads-table td {
    padding: 0.08rem 0.5rem;
    font-size: 0.8rem;
    vertical-align: middle;
}
[data-theme="dark"] .downloads-table th {
    color: #c2c7d0;
}
.downloads-table .downloads-group-header {
    text-align: center;
}
.download-links-cell {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
    white-space: nowrap;
}

/* Disc count line — centered, match title font size */
details + p {
    text-align: center;
    margin-bottom: 0.15rem;
}
details + p small {
    font-size: 0.8rem;
}

/* Center pagination */
#disc-results nav[aria-label="Pagination"] ul {
    justify-content: center;
}
#disc-results nav[aria-label="Pagination"] ul li,
#disc-results nav[aria-label="Pagination"] ul li a {
    font-size: 0.75rem;
}

/* Page jump input */
.page-jump-form {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-size: 0.75rem;
    white-space: nowrap;
}
.page-jump-input {
    width: 2.5rem;
    font-size: 0.75rem;
    padding: 0 0.3rem !important;
    height: 1.5em !important;
    margin: 0;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.page-jump-input::-webkit-inner-spin-button,
.page-jump-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Disc page title */
.disc-page-title {
    text-align: center;
}

/* Filter panel — 2×2 grid layout */
#filter-form {
    display: grid;
    grid-template-columns: auto auto auto auto;
    width: fit-content;
    margin: 0 auto 0.35rem;
    align-items: baseline;
    gap: 0.1rem 0.75rem;
}
#filter-form label {
    display: contents;
    font-size: 0.75rem;
}
#filter-form label span {
    text-align: right;
}
#filter-form select {
    font-size: 0.75rem;
    margin-bottom: 0;
    padding: 0.1rem 0.4rem !important;
    height: auto !important;
}

/* Letter picker */
.letter-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem;
    margin-bottom: 0.35rem;
}
.letter-picker a {
    padding: 0.05rem 0.4rem;
    text-decoration: none;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    transition: background 0.15s;
}
.letter-picker a:hover {
    background: var(--pico-secondary-background);
}
.letter-picker a.active {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
    border-color: var(--pico-primary);
}

/* Hex dump */
.hex-dump {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    white-space: pre;
    overflow-x: auto;
    background: var(--pico-code-background-color);
    padding: 0.75rem;
    border-radius: 4px;
    line-height: 1.4;
}

/* SBI highlight */
.sbi-highlight {
    color: var(--status-bad);
    font-weight: bold;
}

/* Disc view — apply home page table design to all tables */
.disc-view table tbody tr:nth-child(odd) td {
    background-color: #F5F9FC !important;
}
.disc-view table th,
.disc-view table td {
    border-bottom: none !important;
}
[data-theme="dark"] .disc-view table tbody tr:nth-child(odd) td {
    background-color: #1A1E26 !important;
}

/* Disc view page — compact layout */
.disc-view {
    font-size: 0.7rem;
}
.disc-view h2 { font-size: 1.1rem; text-align: center; margin-bottom: 0.2rem; }
.disc-view h3 { font-size: 0.9rem; text-align: center; margin-bottom: 0.2rem; margin-top: 0.5rem; }
.disc-view h4 { font-size: 0.78rem; margin-bottom: 0.15rem; }
/* Center sections and their tables */
.disc-view section {
    text-align: center;
    margin-bottom: 0.5rem;
}
.disc-view .grid {
    gap: 0.5rem;
}
.disc-view table {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.disc-view table td,
.disc-view table th {
    padding: 0.15rem 0.4rem;
}
.disc-view .table-compact td,
.disc-view .table-compact th,
.disc-view .table-scroll-compact > table td,
.disc-view .table-scroll-compact > table th {
    padding: 0.12rem 0.35rem;
    vertical-align: top;
}
.disc-view .table-compact th,
.disc-view .table-scroll-compact > table th {
    text-align: left;
}
.disc-view .table-fit-section {
    display: table;
    width: 100%;
    max-width: 100%;
}
.disc-view .binary-table code {
    font-size: 0.62rem;
    letter-spacing: 0;
}
.disc-view .binary-table td,
.disc-view .binary-table th,
.disc-view .ring-table td,
.disc-view .ring-table th {
    padding: 0.05rem 0.25rem;
    line-height: 1.2;
    vertical-align: middle !important;
}
.disc-view .binary-table code,
.disc-view .disc-table code,
.disc-view .ring-table code {
    vertical-align: middle;
    line-height: inherit;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: inherit;
}
.disc-view table td:first-child {
    text-align: right;
    vertical-align: top;
    white-space: nowrap;
    width: 1%;
}
.disc-view .flags-inline .flag-icon {
    margin: 0;
}
.disc-view .flags-language .flag-icon {
    margin: 0;
}
.disc-view .flags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    align-items: center;
}

/* Left-justified sections on disc view (Files, PVD, PIC, Rings) */
.disc-view .left-section {
    text-align: left;
}
.disc-view .left-section h3 {
    text-align: left;
}

/* Dat filename label under Files heading — matches PVD row height */
.dat-filename {
    font-size: 0.62rem;
    line-height: 1.2;
    text-align: left;
    margin: 0 0 0.25rem 0;
    padding: 0.05rem 0.25rem;
}

/* Preserve newlines in multiline text blocks */
.pre-wrap { white-space: pre-wrap; }

/* Contents disclosure arrow — suppress Pico's float-right chevron, use inline arrow instead */
.disc-view details > summary {
    list-style: none;
    display: flex;
    align-items: center;
    width: fit-content;
    margin: 0 auto;
    cursor: pointer;
}
.disc-view details > summary::-webkit-details-marker {
    display: none;
}
.disc-view details > summary::marker {
    content: '';
}
/* Hide Pico's ::after chevron */
.disc-view details > summary::after {
    display: none !important;
}
/* Custom arrow via ::before on the h3 inside summary */
.disc-view details > summary h3::after {
    content: ' ▶';
    font-size: 0.65em;
    margin-left: 0.3rem;
    display: inline-block;
    transition: transform 0.15s;
    vertical-align: middle;
}
.disc-view details[open] > summary h3::after {
    transform: rotate(90deg);
}

/* Foreign title — sits directly under main h2, same size as section headings */
.disc-view h2.foreign-title {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    color: #0172ad;
}
[data-theme="dark"] .disc-view h2.foreign-title {
    color: #5ab3e0;
}

/* Ring code table */
.ring-table th,
.ring-table td {
    width: auto;
    white-space: nowrap;
}
.ring-group-start > td {
    border-top: 2px solid var(--pico-muted-border-color);
}
.ring-entry-even > td {
    background: rgba(0,0,0,0.04);
}
.ring-table .entry-num {
    vertical-align: middle !important;
    text-align: center;
    font-weight: 600;
}
.ring-tab-marker {
    display: inline-block;
    width: 3ch;
    height: 1em;
    vertical-align: -0.1em;
    background: #dddfff;
    border-radius: 2px;
}

/* ===== Nav: two-row layout ===== */
/* Use header prefix for specificity over Pico's nav element rules */
header .site-nav {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 0;
    padding: 0 !important;
    overflow: visible;
}

/* Row 1: logo + search + login */
header .site-nav-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.site-banner {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.site-banner img {
    display: block;
    height: var(--logo-height);
    width: auto;
}

/* Auth list (username/logout or login) */
.site-nav-auth {
    display: flex !important;
    flex-direction: row !important;
    list-style: none;
    margin: 0 !important;
    padding: 0;
    align-items: center;
    gap: 0.5rem;
}
.site-nav-auth [role="button"],
.site-nav-auth button[type="submit"] {
    height: var(--nav-bar-height);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1;
}

/* Row 2: nav links */
header .site-nav-links {
    display: flex !important;
    flex-direction: row !important;
    list-style: none;
    margin: 0 !important;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
}
header .site-nav-links::before {
    content: '';
    position: absolute;
    top: 25%;
    bottom: 25%;
    left: 0;
    right: 0;
    background: #F5F9FC;
    z-index: 0;
}
header .site-nav-links > li {
    position: relative;
    z-index: 1;
}
[data-theme="dark"] header .site-nav-links::before {
    background: #1A1E26;
}
.site-nav-auth > li {
    padding: 0 !important;
    margin: 0 !important;
}
.site-nav-links > li > a,
.site-nav-links > li > .submenu-label {
    display: block;
    padding: 0.2rem 0.75rem;
    text-decoration: none;
}

/* Nav submenu dropdown */
.submenu-label {
    cursor: pointer;
    color: var(--pico-primary);
}
.has-submenu {
    position: relative;
}
.has-submenu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: var(--pico-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 100;
    min-width: 10rem;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    display: block;
}
.submenu li {
    padding: 0;
    margin: 0;
}
.submenu li a {
    display: block;
    padding: 0.35rem 1rem;
    white-space: nowrap;
    text-decoration: none;
}
.submenu li a:hover {
    background: var(--pico-secondary-background);
}

/* Search box */
nav .quick-search {
    display: flex;
    align-items: center;
    margin: 0;
}
nav .quick-search input[type="text"] {
    margin: 0;
    padding: 0 0.5rem;
    height: var(--nav-bar-height);
    box-sizing: border-box;
    font-size: 0.85rem;
    width: 200px;
}

/* Homepage sections */
.home-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 0;
}
.home-sections section {
    width: 100%;
    max-width: 750px;
    text-align: center;
}
.home-sections h3 {
    margin-bottom: 0.29rem;
    font-size: 1.22rem;
}
.home-sections p {
    margin-bottom: 0.29rem;
    font-size: 0.9rem;
}
.home-news p {
    font-size: 0.8rem;
}
.home-recent-dumps .recent-dumps {
    margin: 0 auto;
    text-align: left;
}
.home-recent-dumps p {
    margin-top: 1.2rem;
    margin-bottom: 0;
}
.home-recent-dumps p a {
    color: #565e6a;
    font-weight: bold;
}

/* Recent dumps table — alternating rows */
.recent-dumps tbody tr:nth-child(odd) td {
    background-color: #F5F9FC !important;
}
.recent-dumps th,
.recent-dumps td {
    border-bottom: none !important;
}

/* Recent dumps table */
.recent-dumps th {
    padding: 0.08rem 0.5rem;
    font-size: 0.9rem;
    text-align: left;
    color: #565e6a;
}
.recent-dumps td {
    padding: 0.08rem 0.5rem;
    font-size: 0.8rem;
    vertical-align: middle;
}
.recent-dumps .region-col {
    text-align: center;
}

/* Queue status dots */
.status-dot-pending  { background: #f39c12; }
.status-dot-approved { background: var(--status-verified); }
.status-dot-rejected { background: var(--status-bad); }
.status-dot-legacy   { background: #999; }

/* Diff view */
.diff-add { background: #e6ffec; }
.diff-remove { background: #ffebe9; }

/* Dark mode toggle — fixed top-right pill switch */
.dark-mode-toggle {
    position: fixed;
    top: 0.65rem;
    right: 1rem;
    z-index: 1000;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #F4F8FB;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
[data-theme="dark"] .dark-mode-toggle {
    background: #1A1E26;
    border: 1px solid #2a3140;
}
.dark-mode-toggle-thumb {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0172ad;
    margin-left: 2px;
    transition: margin-left 0.2s, background 0.2s;
}
[data-theme="dark"] .dark-mode-toggle-thumb {
    margin-left: 22px;
    background: #EFFFFF;
}

/* Responsive nav adjustments */
@media (max-width: 768px) {
    .site-nav-top {
        flex-wrap: wrap;
    }
    .site-nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    nav .quick-search input[type="text"] {
        width: 150px;
    }
    .disc-table {
        font-size: 0.75rem;
    }
}

/* Fieldset styling for forms */
fieldset {
    margin-bottom: 1rem;
}
fieldset legend {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Code blocks in submission detail */
pre code {
    font-size: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Footer online users */
#online-users a {
    text-decoration: none;
}
#online-users a:hover {
    text-decoration: underline;
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline;
}

/* Edit form — compact sizing to match disc list/view */
.disc-edit {
    font-size: 0.75rem;
}
.disc-edit label,
.disc-edit fieldset legend {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.disc-edit input[type="text"],
.disc-edit input[type="number"],
.disc-edit select,
.disc-edit textarea {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    margin-bottom: 0.25rem;
    height: auto;
}
.disc-edit input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.disc-edit input[type="number"]::-webkit-inner-spin-button,
.disc-edit input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.disc-edit fieldset {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
}
.disc-edit fieldset legend {
    font-size: 0.75rem;
}
.disc-edit .grid {
    gap: 0.5rem;
}
.disc-edit input[type="radio"] {
    margin: 0;
}

/* Edit form — flag checkbox lists */
.flag-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.flag-check {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    font-size: 0.75rem;
    cursor: pointer;
}
.flag-check input[type="checkbox"] {
    margin: 0;
}
.flag-check .flag-icon {
    height: 1em;
}
.flag-check span {
    white-space: nowrap;
    font-weight: normal;
}

/* Inline label + values row */
.inline-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
}
.inline-field:last-child {
    border-bottom: none;
}
.inline-radios {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.inline-radios label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: normal;
    margin-bottom: 0;
}
#layerbreak-row {
    border-bottom: none;
}
.inline-field-label {
    font-weight: 600;
    white-space: nowrap;
    min-width: 5rem;
    text-align: right;
}
.inline-field-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
}
.inline-field-removed {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}
.inline-field-removed-label {
    font-size: 0.72rem;
    opacity: 0.85;
}
.inline-field-removed-item {
    padding: 0 0.3rem;
    border-radius: 2px;
}
.inline-field-values input {
    margin-bottom: 0;
    flex: 0 0 auto;
}
.inline-field .array-add-btn {
    flex-shrink: 0;
    margin: 0;
}

/* Repeatable array fields (layerbreaks, etc.) */
.array-editor {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.array-entry {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}
.array-entry input {
    margin-bottom: 0;
}
.array-entry .remove-entry {
    padding: 0.15rem 0.4rem;
    margin: 0;
    flex-shrink: 0;
    font-size: 0.75rem;
}
.array-add-btn {
    width: fit-content;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
}

/* Ring code edit table */
.ring-edit-table input[type="text"] {
    margin-bottom: 0;
    padding: 0.15rem 0.25rem;
    font-size: 0.72rem;
    height: auto;
}
.ring-edit-table .remove-entry {
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    margin: 0;
}

/* Hex dump textarea */
.hex-dump-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.72rem;
    line-height: 1.3;
}

/* Auto-expanding textareas */
textarea.auto-expand {
    overflow: hidden;
    resize: vertical;
}
textarea.fit-width {
    width: auto;
}
textarea.fixed-80 {
    width: 80ch;
}

/* Validation error box */
.validation-errors {
    background: var(--pico-del-color, #c62828);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--pico-border-radius, 0.25rem);
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.validation-errors strong {
    display: block;
    margin-bottom: 0.35rem;
}
.validation-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}
.validation-errors li {
    margin-bottom: 0.15rem;
}

/* Queue review: highlight changed fields */
.field-changed {
    background-color: rgba(255, 235, 59, 0.18);
    border-left: 3px solid rgba(255, 235, 59, 0.7);
    padding-left: 0.5rem;
}
.field-changed > legend,
.field-changed > .inline-field-label {
    padding: 0 4px;
    border-radius: 2px;
}
.field-added {
    background-color: rgba(76, 175, 80, 0.18);
    border-left: 3px solid rgba(76, 175, 80, 0.7);
    padding-left: 0.5rem;
}
.field-added > legend,
.field-added > .inline-field-label {
    padding: 0 4px;
    border-radius: 2px;
}
.field-removed {
    background-color: rgba(244, 67, 54, 0.18);
    border-left: 3px solid rgba(244, 67, 54, 0.7);
    padding-left: 0.5rem;
}
.field-removed > legend,
.field-removed > .inline-field-label {
    padding: 0 4px;
    border-radius: 2px;
}
.item-added { background-color: rgba(76, 175, 80, 0.18); }
.item-removed { background-color: rgba(244, 67, 54, 0.18); }
.item-changed { background-color: rgba(255, 235, 59, 0.18); }
tr.item-added > td { background-color: rgba(76, 175, 80, 0.18); }
tr.item-removed > td { background-color: rgba(244, 67, 54, 0.18); }
tr.item-changed > td { background-color: rgba(255, 235, 59, 0.18); }
tr.field-changed > td { background-color: rgba(255, 235, 59, 0.18); }

/* Queue submission info box */
.submission-info {
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}
.submission-info .table-compact td {
    padding: 0.2rem 0.45rem;
    vertical-align: top;
}
.submission-info .table-compact td:first-child {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}
.submission-info .table-fit-section {
    display: table;
    width: 100%;
    max-width: 100%;
}
.submission-info pre.raw-json {
    max-height: none;
    overflow: visible;
    overflow-x: visible;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.8rem;
}
.submission-info pre.raw-json code {
    max-height: none;
    overflow-y: visible;
}
.submission-info details {
    margin-top: 0.75rem;
}

/* Wrapped text blocks for dump log, comments, etc. */
.section-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    background: var(--pico-code-background-color);
    padding: 0.75rem;
    border-radius: 4px;
}

/* Review action buttons */
.review-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: flex-end;
}
.review-actions .btn-approve {
    background-color: #388e3c;
    border-color: #388e3c;
}
.review-actions .btn-reject {
    background-color: #c62828;
    border-color: #c62828;
}

/* ===== Dark mode overrides ===== */
[data-theme="dark"],
[data-theme="dark"] body {
    color: #ffffff;
}
[data-theme="dark"] a {
    color: #EFFFFF;
}
[data-theme="dark"] a:hover {
    color: #EFFFFF;
}
/* Headers and More... match h3 heading color in dark mode */
[data-theme="dark"] .recent-dumps th {
    color: #c2c7d0;
}
[data-theme="dark"] .home-recent-dumps p a {
    color: #c2c7d0;
}
/* Alternating rows — home page and striped tables */
[data-theme="dark"] .recent-dumps tbody tr:nth-child(odd) td,
[data-theme="dark"] table.striped tbody tr:nth-child(odd) td {
    background-color: #1A1E26 !important;
}
