/* Global light/dark appearance. The page keeps the existing blue accent and
   auction-source colors in both modes. */
html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e7eefb;
    --muted: #9eacc4;
    --line: #263955;
    --panel: #0d1b30;
    --white: #081426;
    --shadow: 0 20px 50px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] body {
    color: #e7eefb;
    background: #071426 !important;
}

/* Navbar toggle */
.theme-toggle {
    display: inline-flex;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    color: #eef4ff;
    background: rgba(255, 255, 255, .08);
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: #79a8ff;
    background: rgba(57, 120, 255, .28);
    transform: translateY(-1px);
}

.theme-toggle-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    place-items: center;
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 767px) {
    .navbar-buttons .theme-toggle {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    .navbar-buttons .theme-toggle-label {
        display: none;
    }
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(121, 168, 255, .65);
    color: #dbe8ff;
    background: rgba(57, 120, 255, .2);
}

/* Catalog */
html[data-theme="dark"] .catalog {
    background: #0b172a;
}

html[data-theme="dark"] .catalog .section-head h2,
html[data-theme="dark"] .catalog-title-row h1,
html[data-theme="dark"] .catalog-title-row h2 {
    color: #edf3ff;
}

html[data-theme="dark"] .catalog-scope-toggle,
html[data-theme="dark"] .active-filters,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .auction-card,
html[data-theme="dark"] .status-panel,
html[data-theme="dark"] .result-toolbar select,
html[data-theme="dark"] .view-toggle-button,
html[data-theme="dark"] .hero-search {
    border-color: #273b5a;
    background: #10213a;
}

html[data-theme="dark"] .catalog-scope-button,
html[data-theme="dark"] .active-filters-label,
html[data-theme="dark"] .result-toolbar label,
html[data-theme="dark"] .result-toolbar p,
html[data-theme="dark"] .filters-title button,
html[data-theme="dark"] .filter-section-toggle,
html[data-theme="dark"] .filter-section-toggle span,
html[data-theme="dark"] .filter-range-grid label > span,
html[data-theme="dark"] .filter-range-slider-values,
html[data-theme="dark"] .filter-year-slider-values,
html[data-theme="dark"] .list-identifiers,
html[data-theme="dark"] .list-identifiers b,
html[data-theme="dark"] .list-datum dt,
html[data-theme="dark"] .list-price-range,
html[data-theme="dark"] .list-panel-fact,
html[data-theme="dark"] .list-feature,
html[data-theme="dark"] .list-feature strong {
    color: #9eacc4;
}

html[data-theme="dark"] .result-toolbar select,
html[data-theme="dark"] .view-toggle-button {
    color: #e7eefb;
}

html[data-theme="dark"] .view-toggle-button[aria-pressed="true"] {
    border-color: #315887;
    color: #edf3ff;
    background: #17345a;
}

html[data-theme="dark"] .catalog-scope-button:hover:not([aria-pressed="true"]),
html[data-theme="dark"] .active-filter-chip:hover,
html[data-theme="dark"] .view-toggle-button:hover:not([aria-pressed="true"]),
html[data-theme="dark"] .filter-check:not(.filter-chip):hover {
    color: #dbe8ff;
    background: #172d4d;
}

@media (hover: hover) and (pointer: fine) {
    html[data-theme="dark"] .filter-options-chips .filter-chip:hover:not([aria-pressed="true"]):not(:has(input:checked)) {
        color: #dbe8ff;
        background: #172d4d;
    }
}

html[data-theme="dark"] .active-filter-chip {
    border-color: #315887;
    color: #bed5ff;
    background: #17345a;
}

html[data-theme="dark"] .active-filter-chip b {
    color: #d7e6ff;
    background: rgba(190, 213, 255, .16);
}

html[data-theme="dark"] .active-filters-clear {
    color: #a9c8ff;
}

html[data-theme="dark"] .hero-search input,
html[data-theme="dark"] .hero-search select,
html[data-theme="dark"] .hero-combobox-trigger,
html[data-theme="dark"] .filters input,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .filter-options-search input {
    color: #e7eefb;
    background: #0b1a30;
    border-color: #2a4161;
}

html[data-theme="dark"] .hero-search label > span,
html[data-theme="dark"] .hero-search-field > span,
html[data-theme="dark"] .filters label > span,
html[data-theme="dark"] .filters-title strong,
html[data-theme="dark"] .filter-section legend {
    color: #a9b8d0;
}

html[data-theme="dark"] .hero-combobox-menu,
html[data-theme="dark"] .hero-combobox-search,
html[data-theme="dark"] .hero-combobox-option,
html[data-theme="dark"] .filter-options,
html[data-theme="dark"] .filter-check,
html[data-theme="dark"] .filter-options-chips .filter-chip {
    border-color: #2a4161;
    color: #d9e5f8;
    background: #10213a;
}

html[data-theme="dark"] .hero-combobox-option:hover,
html[data-theme="dark"] .hero-combobox-option[aria-selected="true"],
html[data-theme="dark"] .hero-combobox-option.is-active,
html[data-theme="dark"] .filter-options-chips .filter-chip:has(input:checked) {
    color: #dbe8ff;
    background: #1a3b6c;
}

html[data-theme="dark"] .auction-grid.is-list .list-feature-strip,
html[data-theme="dark"] .list-status-pill,
html[data-theme="dark"] .auction-grid.is-list .list-status-pill {
    background: #172940;
}

html[data-theme="dark"] .auction-grid.is-list .card-content h3,
html[data-theme="dark"] .auction-grid.is-list .list-panel-fact dd,
html[data-theme="dark"] .auction-grid.is-list .list-datum dd {
    color: #e2ebfa;
}

html[data-theme="dark"] .auction-card .card-content h3,
html[data-theme="dark"] .auction-card .card-specs strong,
html[data-theme="dark"] .auction-card .price-row strong,
html[data-theme="dark"] .auction-grid.is-list .list-price-range strong,
html[data-theme="dark"] .auction-grid.is-list .list-feature strong,
html[data-theme="dark"] .auction-grid.is-list .list-panel-fact span {
    color: #edf3ff;
}

html[data-theme="dark"] .auction-card .lot-meta,
html[data-theme="dark"] .auction-card .card-specs span,
html[data-theme="dark"] .auction-card .price-row span,
html[data-theme="dark"] .auction-card .card-sale-details dt,
html[data-theme="dark"] .auction-grid.is-list .list-identifiers,
html[data-theme="dark"] .auction-grid.is-list .list-identifiers b,
html[data-theme="dark"] .auction-grid.is-list .list-datum dt,
html[data-theme="dark"] .auction-grid.is-list .list-feature i,
html[data-theme="dark"] .auction-grid.is-list .list-price-range i,
html[data-theme="dark"] .auction-grid.is-list .list-panel-fact i,
html[data-theme="dark"] .auction-grid.is-list .list-final-offer span,
html[data-theme="dark"] .auction-grid.is-list .list-status-pill {
    color: #b7c7df;
}

html[data-theme="dark"] .auction-card .card-specs {
    border-color: var(--line);
}

html[data-theme="dark"] .auction-card .card-sale-details {
    background: transparent;
}

html[data-theme="dark"] .auction-grid.is-list .list-final-offer {
    background: #251d29;
}

html[data-theme="dark"] .auction-grid.is-list .list-final-offer strong,
html[data-theme="dark"] .auction-grid.is-list .list-status-pill.is-ended {
    color: #ffb8b8;
}

html[data-theme="dark"] .auction-grid.is-list .list-status-pill.is-active {
    color: #8fe0b3;
}

html[data-theme="dark"] .auction-grid.is-list .card-footer,
html[data-theme="dark"] .auction-grid.is-list .list-final-offer {
    border-color: #293e5c;
}

html[data-theme="dark"] .auction-grid.is-list .auction-card,
html[data-theme="dark"] .auction-grid.is-list .skeleton,
html[data-theme="dark"] .auction-grid.is-list .list-auction-date,
html[data-theme="dark"] .auction-grid.is-list .list-feature + .list-feature {
    border-color: #293e5c;
}

html[data-theme="dark"] .auction-grid.is-list .list-datum,
html[data-theme="dark"] .auction-grid.is-list .card-sale-details > div {
    background: #172940;
}

html[data-theme="dark"] .auction-grid.is-list .card-sale-details dd {
    color: #edf3ff;
}

html[data-theme="dark"] .auction-grid.is-list .list-category {
    color: #94bdff;
    background: #1b3558;
}

html[data-theme="dark"] .auction-grid.is-list .list-panel-fact b,
html[data-theme="dark"] .auction-grid.is-list .list-mileage-secondary,
html[data-theme="dark"] .auction-grid.is-list .list-datum dt i,
html[data-theme="dark"] .auction-grid.is-list .card-sale-details dt i {
    color: #a7bbd7;
}

html[data-theme="dark"] .auction-grid.is-list .list-status-pill.is-active {
    color: #fff;
    background: #168651;
}

html[data-theme="dark"] .auction-grid.is-list .details-button {
    color: #94bdff;
    border-color: #648fff;
    background: transparent;
}

html[data-theme="dark"] .pagination-button,
html[data-theme="dark"] .status-panel button {
    color: #cbdafa;
    border-color: #395272;
    background: #132845;
}

/* Auction detail */
html[data-theme="dark"] .auction-detail-page,
html[data-theme="dark"] .auction-detail {
    background: #071426;
}

html[data-theme="dark"] .auction-detail {
    background: linear-gradient(180deg, #000814 0, #06132d 285px, #071426 285px, #071426 100%);
}

html[data-theme="dark"] .detail-logistics,
html[data-theme="dark"] .vehicle-gallery,
html[data-theme="dark"] .vehicle-gallery-head,
html[data-theme="dark"] .vehicle-gallery-stage,
html[data-theme="dark"] .vehicle-gallery-thumb-rail,
html[data-theme="dark"] .auction-panel,
html[data-theme="dark"] .auction-information-section,
html[data-theme="dark"] .vehicle-specifications,
html[data-theme="dark"] .information-card,
html[data-theme="dark"] .similar-vehicle-card {
    border-color: #2a3f5d;
    background: #10213a;
}

/* Keep the full vehicle-information area and its right-side advisor column
   on the same dark surface as the rest of the detail page. */
html[data-theme="dark"] .auction-information-section {
    background: #0b172a;
}

html[data-theme="dark"] .detail-right-column,
html[data-theme="dark"] .information-side-component {
    background: transparent;
}

html[data-theme="dark"] .detail-logistics strong,
html[data-theme="dark"] .vehicle-gallery-head h2,
html[data-theme="dark"] .similar-vehicles-heading h2,
html[data-theme="dark"] .information-card h3,
html[data-theme="dark"] .vehicle-specifications-head h2,
html[data-theme="dark"] .auction-panel-price-main > strong,
html[data-theme="dark"] .auction-panel-facts dd,
html[data-theme="dark"] .auction-panel-sale-status-row dd,
html[data-theme="dark"] .auction-panel-phone strong,
html[data-theme="dark"] .information-card .information-row dd,
html[data-theme="dark"] .auction-history-cell,
html[data-theme="dark"] .vehicle-specifications-grid dd {
    color: #e7eefb;
}

html[data-theme="dark"] .detail-logistics small,
html[data-theme="dark"] .vehicle-gallery-head span,
html[data-theme="dark"] .auction-panel-price small,
html[data-theme="dark"] .auction-panel-registration-summary small,
html[data-theme="dark"] .auction-panel-facts dt,
html[data-theme="dark"] .auction-panel-sale-status-row dt,
html[data-theme="dark"] .auction-panel-phone small,
html[data-theme="dark"] .auction-panel-note,
html[data-theme="dark"] .information-card .information-row dt,
html[data-theme="dark"] .auction-history-cell-label,
html[data-theme="dark"] .auction-history-note,
html[data-theme="dark"] .auction-history-empty,
html[data-theme="dark"] .vehicle-specifications-grid dt,
html[data-theme="dark"] .similar-vehicles-heading span {
    color: #9eacc4;
}

html[data-theme="dark"] .detail-logistics > div + div,
html[data-theme="dark"] .auction-panel-price,
html[data-theme="dark"] .auction-panel-facts div,
html[data-theme="dark"] .auction-panel-sale-status-row,
html[data-theme="dark"] .information-card .information-row,
html[data-theme="dark"] .auction-history-entry,
html[data-theme="dark"] .vehicle-specifications-grid div {
    border-color: #293e5c;
}

html[data-theme="dark"] .auction-panel-market-estimate {
    border-color: #315887;
    background: #122c4d;
}

html[data-theme="dark"] .auction-panel-market-estimate small,
html[data-theme="dark"] .auction-panel-market-estimate span {
    color: #a9bddc;
}

html[data-theme="dark"] .auction-panel-market-estimate strong {
    color: #a9c8ff;
}

html[data-theme="dark"] .detail-logistics-icon,
html[data-theme="dark"] .gallery-media-button,
html[data-theme="dark"] .vehicle-gallery-thumb-arrow,
html[data-theme="dark"] .auction-panel-phone,
html[data-theme="dark"] .information-copy {
    border-color: #395272;
    color: #bcd2f6;
    background: #172e4d;
}

html[data-theme="dark"] .information-value-success {
    color: #8fe0b3;
    border-color: #2c7556;
    background: #173d32;
}

html[data-theme="dark"] .information-value-danger {
    color: #ffb8b8;
    border-color: #8f4651;
    background: #3a1d27;
}

html[data-theme="dark"] .vehicle-gallery-image img,
html[data-theme="dark"] .vehicle-gallery-thumb,
html[data-theme="dark"] .vehicle-gallery-thumb img,
html[data-theme="dark"] .similar-vehicle-image-link {
    background: #0a172a;
}

html[data-theme="dark"] .auction-history-link {
    color: #82b2ff;
}

html[data-theme="dark"] .auction-history-link:hover,
html[data-theme="dark"] .auction-history-link:focus-visible {
    color: #b9d4ff;
}

html[data-theme="dark"] .auction-history-status.is-result {
    color: #a9c8ff;
    border-color: #3c5f91;
    background: #1a3155;
}

html[data-theme="dark"] .auction-history-status.is-pending {
    color: #f3bd80;
    border-color: #805b36;
    background: #4a321c;
}

html[data-theme="dark"] .auction-history-status.is-neutral {
    color: #bdcbe0;
    border-color: #425a79;
    background: #1a2f4b;
}

html[data-theme="dark"] .auction-history-loading {
    color: #b7c7df;
}

html[data-theme="dark"] .auction-history-loading-heading {
    color: #e7eefb;
}

html[data-theme="dark"] .auction-history-loading > p {
    color: #9eacc4;
}

html[data-theme="dark"] .auction-history-loading-spinner {
    border-color: #395272;
    border-top-color: #82b2ff;
}

html[data-theme="dark"] .auction-history-progress {
    background: #1a2f4b;
}

html[data-theme="dark"] .auction-history-progress span {
    background: linear-gradient(90deg, #4d8dff, #a5c6ff);
}

html[data-theme="dark"] .auction-history-skeleton span {
    background: linear-gradient(90deg, #172e4d 25%, #234364 50%, #172e4d 75%);
    background-size: 220% 100%;
}

html[data-theme="dark"] .auction-history-note.is-error {
    color: #f3bd80;
}

html[data-theme="dark"] .import-specialist-card {
    border-color: #2d5683;
    background: #102b49;
}

/* The recommendation state has a more specific light-theme rule in
   detail.css, so mirror both recommendation variants explicitly here. */
html[data-theme="dark"] .information-side-component.is-recommended .import-specialist-card,
html[data-theme="dark"] .information-side-component.is-not-recommended .import-specialist-card {
    border-color: #2d5683;
    background: #102b49;
}

html[data-theme="dark"] .import-specialist-copy strong,
html[data-theme="dark"] .import-specialist-copy p {
    color: #e4edfc;
}

html[data-theme="dark"] .import-specialist-copy span {
    color: #a8bad4;
}

html[data-theme="dark"] .similar-vehicle-vin,
html[data-theme="dark"] .similar-vehicle-status,
html[data-theme="dark"] .similar-vehicle-price small {
    color: #9eacc4;
}

html[data-theme="dark"] .similar-vehicles-loading {
    border-color: #2a3f5d;
    color: #b7c7df;
    background: #10213a;
}

html[data-theme="dark"] .similar-vehicles-loading-heading {
    color: #e7eefb;
}

html[data-theme="dark"] .similar-vehicles-loading > p {
    color: #9eacc4;
}

html[data-theme="dark"] .similar-vehicles-loading-spinner {
    border-color: #395272;
    border-top-color: #82b2ff;
}

html[data-theme="dark"] .similar-vehicles-progress {
    background: #1a2f4b;
}

html[data-theme="dark"] .similar-vehicles-progress span {
    background: linear-gradient(90deg, #4d8dff, #a5c6ff);
}

html[data-theme="dark"] .similar-vehicles-skeleton span {
    background: linear-gradient(90deg, #172e4d 25%, #234364 50%, #172e4d 75%);
    background-size: 220% 100%;
}

html[data-theme="dark"] .similar-vehicle-price {
    background: #251d29;
}

html[data-theme="dark"] .previous-sale-indicator {
    color: #ffe1e1;
    border-color: #a94b57;
    background: #741f2b;
}

html[data-theme="dark"] .previous-sale-list-indicator {
    color: #ffb8b8;
    border-color: #8f4651;
    background: #3a1d27;
}

html[data-theme="dark"] .auction-panel-previous-sale-chip {
    color: #ffb8b8;
    border-color: #8f4651;
    background: #3a1d27;
}

html[data-theme="dark"] .catalog-lightbox-dialog,
html[data-theme="dark"] .lot-dialog {
    border-color: #2a3f5d;
    background: #0d1b30;
}

html[data-theme="dark"] .catalog-lightbox-header,
html[data-theme="dark"] .catalog-lightbox-thumb-rail {
    border-color: #293e5c;
    background: #10213a;
}

html[data-theme="dark"] .catalog-lightbox-header h2,
html[data-theme="dark"] .catalog-lightbox-header > span {
    color: #e7eefb;
}
