/**
 * Dark chrome for digital plot layouts.
 * Loaded only when data-layout-theme="dark".
 * Does NOT alter SVG plot status fills (available/hold/booked/matched).
 */

[data-layout-theme="dark"] {
    color-scheme: dark;
}

[data-layout-theme="dark"] body {
    background-color: #0f172a !important;
    color: #e2e8f0;
}

/*
 * style.css hard-sets p/h* to dark --headings-color / --title-headings-color.
 * Those do not inherit body color, so paragraphs vanish on dark chrome.
 */
[data-layout-theme="dark"] p,
[data-layout-theme="dark"] label,
[data-layout-theme="dark"] li,
[data-layout-theme="dark"] td,
[data-layout-theme="dark"] th,
[data-layout-theme="dark"] small {
    color: #e2e8f0;
}

[data-layout-theme="dark"] h1,
[data-layout-theme="dark"] h2,
[data-layout-theme="dark"] h3,
[data-layout-theme="dark"] h4,
[data-layout-theme="dark"] h5,
[data-layout-theme="dark"] h6,
[data-layout-theme="dark"] .h1,
[data-layout-theme="dark"] .h2,
[data-layout-theme="dark"] .h3,
[data-layout-theme="dark"] .h4,
[data-layout-theme="dark"] .h5,
[data-layout-theme="dark"] .h6 {
    color: #f1f5f9;
}

/* Generic form controls outside forced-light islands */
[data-layout-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
[data-layout-theme="dark"] textarea,
[data-layout-theme="dark"] select {
    background-color: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

[data-layout-theme="dark"] input::placeholder,
[data-layout-theme="dark"] textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

[data-layout-theme="dark"] html:fullscreen,
[data-layout-theme="dark"] html:-webkit-full-screen,
[data-layout-theme="dark"] body:fullscreen,
[data-layout-theme="dark"] body:-webkit-full-screen {
    background: #0f172a !important;
}

/* Page paper grid / layout canvas */
[data-layout-theme="dark"] .bg-paper-grid {
    background:
        linear-gradient(-90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(-90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(transparent 3px, #1e293b 3px, #1e293b 78px, transparent 78px),
        linear-gradient(-90deg, #475569 1px, transparent 1px),
        linear-gradient(-90deg, transparent 3px, #1e293b 3px, #1e293b 78px, transparent 78px),
        linear-gradient(#475569 1px, transparent 1px),
        #1e293b;
    background-size:
        4px 4px,
        4px 4px,
        80px 80px,
        80px 80px,
        80px 80px,
        80px 80px,
        80px 80px,
        80px 80px;
}

/* Chrome titles / muted copy */
[data-layout-theme="dark"] .layout-chrome-title,
[data-layout-theme="dark"] .top-fixed-project-title,
[data-layout-theme="dark"] .fixed-reload-btn,
[data-layout-theme="dark"] .all-plots-info-filters {
    color: #f1f5f9 !important;
}

[data-layout-theme="dark"] .layout-chrome-muted,
[data-layout-theme="dark"] #project-availability {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .layout-chrome-surface {
    background-color: #1e293b !important;
    color: #e2e8f0;
}

/* Bootstrap modal chrome */
[data-layout-theme="dark"] .modal-content {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-layout-theme="dark"] .modal-header,
[data-layout-theme="dark"] .modal-footer {
    border-color: #334155;
}

[data-layout-theme="dark"] .modal-title,
[data-layout-theme="dark"] .modal-body,
[data-layout-theme="dark"] .modal-body label,
[data-layout-theme="dark"] .modal-body .form-label {
    color: #e2e8f0;
}

[data-layout-theme="dark"] .modal-body .form-control,
[data-layout-theme="dark"] .modal-body .form-select,
[data-layout-theme="dark"] .modal-body input,
[data-layout-theme="dark"] .modal-body select,
[data-layout-theme="dark"] .modal-body textarea {
    background-color: #0f172a;
    border-color: #475569;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .modal-body .form-control:focus,
[data-layout-theme="dark"] .modal-body .form-select:focus {
    background-color: #0f172a;
    border-color: #64748b;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .modal-body .btn-close {
    filter: invert(1) grayscale(100%);
}

[data-layout-theme="dark"] .alert-secondary {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

/* Filter chips */
[data-layout-theme="dark"] .layout-filter-chip-section .layout-filter-chip-label {
    color: #cbd5e1;
}

[data-layout-theme="dark"] .layout-filter-chip {
    border-color: #475569;
    background: #334155;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .layout-filter-chip:hover {
    border-color: #64748b;
    background: #3f4f63;
}

[data-layout-theme="dark"] .layout-filter-chip.is-selected {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

[data-layout-theme="dark"] .layout-filter-match-count {
    background: #064e3b;
    border-color: #047857;
    color: #a7f3d0;
}

[data-layout-theme="dark"] .layout-filter-match-count .layout-filter-match-count-num {
    color: #6ee7b7;
}

[data-layout-theme="dark"] .layout-filter-match-count.is-empty {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-layout-theme="dark"] .layout-filter-match-count.is-empty .layout-filter-match-count-num {
    color: #cbd5e1;
}

[data-layout-theme="dark"] .layout-filter-chip-hint {
    color: #94a3b8;
}

/* Stats / filter bar chrome */
[data-layout-theme="dark"] .plots-filters-container {
    background: #0f172a !important;
    border-bottom-color: #334155 !important;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .plots-filters-container .stats-bar::-webkit-scrollbar-track {
    background: #1e293b;
}

[data-layout-theme="dark"] .plots-filters-container .stats-bar::-webkit-scrollbar-thumb {
    background: #475569;
}

[data-layout-theme="dark"] .plots-filters-container .compact-company-status-pill {
    border-color: #475569;
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .plots-filters-container .compact-company-status-empty {
    color: #94a3b8;
}

/* Stats bar text that is not on colored chips */
[data-layout-theme="dark"] .stats-bar {
    color: #e2e8f0;
}

/*
 * Total / Available chips often use transparent bg + #0f172a text (light theme).
 * That matches the dark filter bar and disappears — force readable contrast.
 * Colored chips keep white/light text which still works on status fills.
 */
[data-layout-theme="dark"] .plots-filters-container .stat-chip.total,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.available,
[data-layout-theme="dark"] .stat-chip.total,
[data-layout-theme="dark"] .stat-chip.available {
    color: #f8fafc !important;
}

[data-layout-theme="dark"] .plots-filters-container .stat-chip.total .count,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.available .count,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.total .icon,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.available .icon,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.total span,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.available span {
    color: inherit !important;
}

/* Transparent / near-dark available fills: give chips a visible surface */
[data-layout-theme="dark"] .plots-filters-container .stat-chip.total,
[data-layout-theme="dark"] .plots-filters-container .stat-chip.available {
    border: 1px solid #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

[data-layout-theme="dark"] .stat-chip {
    color: #e2e8f0;
}

/* View Unit Types + Reset layout */
[data-layout-theme="dark"] .plots-filters-container label,
[data-layout-theme="dark"] .plots-filters-container label span,
[data-layout-theme="dark"] #togglePlotTypeColors + span,
[data-layout-theme="dark"] label[for="togglePlotTypeColors"],
[data-layout-theme="dark"] label:has(#togglePlotTypeColors) {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] #resetLayoutViewBtn.btn-outline-secondary,
[data-layout-theme="dark"] #resetLayoutViewBtn {
    color: #e2e8f0 !important;
    border-color: #64748b !important;
    background-color: #1e293b !important;
}

[data-layout-theme="dark"] #resetLayoutViewBtn:hover {
    color: #fff !important;
    border-color: #94a3b8 !important;
    background-color: #334155 !important;
}

[data-layout-theme="dark"] #plotTypeLegendInline {
    color: #e2e8f0;
}

/* Form switches / toggles / muted chrome text */
[data-layout-theme="dark"] .form-check-label,
[data-layout-theme="dark"] .form-switch .form-check-label,
[data-layout-theme="dark"] .text-muted,
[data-layout-theme="dark"] .small.text-muted,
[data-layout-theme="dark"] small.text-muted {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .form-check-input {
    background-color: #334155;
    border-color: #64748b;
}

[data-layout-theme="dark"] .form-check-input:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}

[data-layout-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

/* Bootstrap outline / light buttons on dark chrome */
[data-layout-theme="dark"] .btn-outline-secondary {
    color: #cbd5e1 !important;
    border-color: #64748b !important;
}

[data-layout-theme="dark"] .btn-outline-secondary:hover {
    color: #fff !important;
    background-color: #475569 !important;
    border-color: #94a3b8 !important;
}

[data-layout-theme="dark"] .btn-outline-info {
    color: #7dd3fc !important;
    border-color: #38bdf8 !important;
}

[data-layout-theme="dark"] .btn-outline-info:hover {
    color: #0f172a !important;
    background-color: #38bdf8 !important;
}

[data-layout-theme="dark"] .btn-outline-primary {
    color: #93c5fd !important;
    border-color: #60a5fa !important;
}

[data-layout-theme="dark"] .btn-outline-primary:hover {
    color: #0f172a !important;
    background-color: #60a5fa !important;
}

[data-layout-theme="dark"] .btn-light {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .btn-light:hover {
    background-color: #475569 !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .table-light,
[data-layout-theme="dark"] .table-light > th,
[data-layout-theme="dark"] .table-light > td,
[data-layout-theme="dark"] thead.table-light th {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

/* Cart list */
[data-layout-theme="dark"] #cart-list li {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-layout-theme="dark"] #cart-list li:hover {
    background-color: #334155;
}

/* Booking / holding popup tables */
[data-layout-theme="dark"] .booking-table tbody td,
[data-layout-theme="dark"] .holding-table tbody td {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-layout-theme="dark"] .booking-table tbody tr:hover td,
[data-layout-theme="dark"] .holding-table tbody tr:hover td {
    background-color: #273549;
}

[data-layout-theme="dark"] .clickable-id {
    color: #7dd3fc !important;
    background-color: #0c4a6e;
}

[data-layout-theme="dark"] .clickable-id:hover {
    background-color: #0284c7;
    color: #fff !important;
}

[data-layout-theme="dark"] .status-booked {
    background-color: #14532d;
    color: #bbf7d0;
}

[data-layout-theme="dark"] .status-balance {
    background-color: #713f12;
    color: #fde68a;
}

[data-layout-theme="dark"] .status-paid {
    background-color: #1e3a5f;
    color: #bfdbfe;
}

[data-layout-theme="dark"] .customer-link,
[data-layout-theme="dark"] .agent-link {
    color: #d8b4fe !important;
}

[data-layout-theme="dark"] .customer-link:hover,
[data-layout-theme="dark"] .agent-link:hover {
    color: #e9d5ff !important;
}

[data-layout-theme="dark"] .mobile-info,
[data-layout-theme="dark"] .created-by-info,
[data-layout-theme="dark"] .last-fetched {
    color: #94a3b8;
}

[data-layout-theme="dark"] .price-amount {
    color: #e2e8f0;
}

[data-layout-theme="dark"] .date-info {
    color: #cbd5e1;
}

/*
 * Tippy hover tooltips ship inline white cards + dark text.
 * Forcing only light text left white-on-white (invisible). Darken cards too.
 * Status chips (Available / Hold / Booked) keep distinct colors — see below.
 */
[data-layout-theme="dark"] .tippy-box,
[data-layout-theme="dark"] .tippy-box[data-theme~='light'],
[data-layout-theme="dark"] .tippy-box[data-theme~='light-border'] {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border: none !important;
    box-shadow: none !important;
}

[data-layout-theme="dark"] .tippy-content {
    background: transparent !important;
    color: #e2e8f0 !important;
    padding: 4px !important;
}

[data-layout-theme="dark"] .tippy-arrow {
    color: #1e293b !important;
}

[data-layout-theme="dark"] .tippy-content > div {
    background: #1e293b !important;
    border-color: #475569 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55) !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .tippy-content div,
[data-layout-theme="dark"] .tippy-content span,
[data-layout-theme="dark"] .tippy-content p,
[data-layout-theme="dark"] .tippy-content td,
[data-layout-theme="dark"] .tippy-content th,
[data-layout-theme="dark"] .tippy-content li,
[data-layout-theme="dark"] .tippy-content i,
[data-layout-theme="dark"] .tippy-content strong,
[data-layout-theme="dark"] .tippy-content b,
[data-layout-theme="dark"] .tippy-content label,
[data-layout-theme="dark"] .tippy-content small {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .tippy-content a,
[data-layout-theme="dark"] .tippy-content a * {
    color: #7dd3fc !important;
}

/* Nested light panels inside tooltip HTML (NOT status chips — those are below) */
[data-layout-theme="dark"] .tippy-content [style*="background:#fff"],
[data-layout-theme="dark"] .tippy-content [style*="background: #fff"],
[data-layout-theme="dark"] .tippy-content [style*="background:#ffffff"],
[data-layout-theme="dark"] .tippy-content [style*="background: #ffffff"],
[data-layout-theme="dark"] .tippy-content [style*="background:#f8fafc"],
[data-layout-theme="dark"] .tippy-content [style*="background: #f8fafc"],
[data-layout-theme="dark"] .tippy-content [style*="background:#f1f5f9"],
[data-layout-theme="dark"] .tippy-content [style*="background: #f1f5f9"],
[data-layout-theme="dark"] .tippy-content [style*="background:#f3f4f6"],
[data-layout-theme="dark"] .tippy-content [style*="background: #f3f4f6"],
[data-layout-theme="dark"] .tippy-content [style*="background:#f9fafb"],
[data-layout-theme="dark"] .tippy-content [style*="background: #f9fafb"],
[data-layout-theme="dark"] .tippy-content [style*="background:#e0e7ff"],
[data-layout-theme="dark"] .tippy-content [style*="background: #e0e7ff"] {
    background: #0f172a !important;
    border-color: #475569 !important;
}

/*
 * Status chips from resolvePlotStatusChipHtml + Unit label:
 * Available #ecfdf5/#166534, Hold #eff6ff/#1d4ed8, Booked #fef2f2/#991b1b
 * Blanket light-text + light Hold bg made Hold invisible (light-on-light).
 */
[data-layout-theme="dark"] .tippy-content [style*="background:#ecfdf5"],
[data-layout-theme="dark"] .tippy-content [style*="background: #ecfdf5"],
[data-layout-theme="dark"] .tippy-content [style*="background:#f0fdf4"],
[data-layout-theme="dark"] .tippy-content [style*="background: #f0fdf4"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#ecfdf5"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #ecfdf5"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f0fdf4"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f0fdf4"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#ecfdf5"],
[data-layout-theme="dark"] #plots-details-model [style*="background: #ecfdf5"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#f0fdf4"],
[data-layout-theme="dark"] #plots-details-model [style*="background: #f0fdf4"] {
    background: #14532d !important;
    border-color: #22c55e !important;
    color: #bbf7d0 !important;
}

[data-layout-theme="dark"] .tippy-content [style*="background:#eff6ff"],
[data-layout-theme="dark"] .tippy-content [style*="background: #eff6ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#eff6ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #eff6ff"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#eff6ff"],
[data-layout-theme="dark"] #plots-details-model [style*="background: #eff6ff"] {
    background: #1e3a8a !important;
    border-color: #60a5fa !important;
    color: #bfdbfe !important;
}

[data-layout-theme="dark"] .tippy-content [style*="background:#fef2f2"],
[data-layout-theme="dark"] .tippy-content [style*="background: #fef2f2"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#fef2f2"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #fef2f2"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#fef2f2"],
[data-layout-theme="dark"] #plots-details-model [style*="background: #fef2f2"] {
    background: #7f1d1d !important;
    border-color: #f87171 !important;
    color: #fecaca !important;
}

/* Status chip text colors (beat blanket tippy/modal span !important) */
[data-layout-theme="dark"] .tippy-content [style*="color:#166534"],
[data-layout-theme="dark"] .tippy-content [style*="color: #166534"],
[data-layout-theme="dark"] .tippy-content [style*="color:#065f46"],
[data-layout-theme="dark"] .tippy-content [style*="color: #065f46"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#166534"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #166534"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#065f46"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #065f46"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#166534"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #166534"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#065f46"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #065f46"] {
    color: #bbf7d0 !important;
}

[data-layout-theme="dark"] .tippy-content [style*="color:#1d4ed8"],
[data-layout-theme="dark"] .tippy-content [style*="color: #1d4ed8"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#1d4ed8"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #1d4ed8"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#1d4ed8"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #1d4ed8"] {
    color: #bfdbfe !important;
}

[data-layout-theme="dark"] .tippy-content [style*="color:#991b1b"],
[data-layout-theme="dark"] .tippy-content [style*="color: #991b1b"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#991b1b"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #991b1b"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#991b1b"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #991b1b"] {
    color: #fecaca !important;
}

/* Ownership / type chips keep readable accent (not washed to plain slate) */
[data-layout-theme="dark"] .tippy-content [style*="background:#ecfdf5"][style*="color:#047857"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#ecfdf5"][style*="color:#047857"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#ec"][style*="color:#047"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#047857"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#047857"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #047857"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #047857"] {
    color: #6ee7b7 !important;
}

[data-layout-theme="dark"] .tippy-content [style*="background:#e0e7ff"],
[data-layout-theme="dark"] .tippy-content [style*="background: #e0e7ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#e0e7ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #e0e7ff"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#e0e7ff"],
[data-layout-theme="dark"] #plots-details-model [style*="background: #e0e7ff"] {
    background: #312e81 !important;
    border-color: #818cf8 !important;
    color: #c7d2fe !important;
}

/* Unit type lavender chips (#f5f3ff / #5b21b6) — mid cascade; final span rules reinforce */
[data-layout-theme="dark"] .tippy-content [style*="background:#f5f3ff"],
[data-layout-theme="dark"] .tippy-content [style*="background: #f5f3ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f5f3ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f5f3ff"],
[data-layout-theme="dark"] #plots-details-model [style*="background:#f5f3ff"],
[data-layout-theme="dark"] #plots-details-model [style*="background: #f5f3ff"] {
    background: #4c1d95 !important;
    border-color: #a78bfa !important;
    color: #ede9fe !important;
}

[data-layout-theme="dark"] .tippy-content [style*="color:#4338ca"],
[data-layout-theme="dark"] .tippy-content [style*="color: #4338ca"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#4338ca"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #4338ca"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#4338ca"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #4338ca"] {
    color: #c7d2fe !important;
}

[data-layout-theme="dark"] .popup-info-container {
    color: #e2e8f0;
}

/* Plot details / booking enquiry / site-visit — full dark chrome (not white islands) */
[data-layout-theme="dark"] #plots-details-model .modal-content,
[data-layout-theme="dark"] #booking-enquiry-model .modal-content,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-content,
[data-layout-theme="dark"] #siteVisitConfirmationModal .modal-content {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    color-scheme: dark;
}

[data-layout-theme="dark"] #plots-details-model .modal-header,
[data-layout-theme="dark"] #plots-details-model .modal-footer,
[data-layout-theme="dark"] #booking-enquiry-model .modal-header,
[data-layout-theme="dark"] #booking-enquiry-model .modal-footer,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-header,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-footer,
[data-layout-theme="dark"] #siteVisitConfirmationModal .modal-header,
[data-layout-theme="dark"] #siteVisitConfirmationModal .modal-footer {
    border-color: #334155 !important;
    background-color: #1e293b !important;
}

[data-layout-theme="dark"] #plots-details-model .modal-title,
[data-layout-theme="dark"] #plots-details-model .modal-body,
[data-layout-theme="dark"] #plots-details-model #modal-plots-details,
[data-layout-theme="dark"] #booking-enquiry-model .modal-title,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-title,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body label,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body .form-label,
[data-layout-theme="dark"] #siteVisitConfirmationModal .modal-title,
[data-layout-theme="dark"] #siteVisitConfirmationModal .modal-body,
[data-layout-theme="dark"] #plots-details-model p,
[data-layout-theme="dark"] #plots-details-model span,
[data-layout-theme="dark"] #plots-details-model label,
[data-layout-theme="dark"] #plots-details-model li,
[data-layout-theme="dark"] #plots-details-model td,
[data-layout-theme="dark"] #plots-details-model th,
[data-layout-theme="dark"] #plots-details-model h1,
[data-layout-theme="dark"] #plots-details-model h2,
[data-layout-theme="dark"] #plots-details-model h3,
[data-layout-theme="dark"] #plots-details-model h4,
[data-layout-theme="dark"] #plots-details-model h5,
[data-layout-theme="dark"] #plots-details-model h6,
[data-layout-theme="dark"] #booking-enquiry-model p,
[data-layout-theme="dark"] #booking-enquiry-model span,
[data-layout-theme="dark"] #booking-enquiry-model label,
[data-layout-theme="dark"] #booking-enquiry-model li,
[data-layout-theme="dark"] #booking-enquiry-model h1,
[data-layout-theme="dark"] #booking-enquiry-model h2,
[data-layout-theme="dark"] #booking-enquiry-model h3,
[data-layout-theme="dark"] #booking-enquiry-model h4,
[data-layout-theme="dark"] #booking-enquiry-model h5,
[data-layout-theme="dark"] #booking-enquiry-model h6,
[data-layout-theme="dark"] #siteVisitBookingModal p,
[data-layout-theme="dark"] #siteVisitBookingModal span,
[data-layout-theme="dark"] #siteVisitBookingModal label,
[data-layout-theme="dark"] #siteVisitBookingModal h1,
[data-layout-theme="dark"] #siteVisitBookingModal h2,
[data-layout-theme="dark"] #siteVisitBookingModal h3,
[data-layout-theme="dark"] #siteVisitBookingModal h4,
[data-layout-theme="dark"] #siteVisitBookingModal h5,
[data-layout-theme="dark"] #siteVisitBookingModal h6,
[data-layout-theme="dark"] #siteVisitConfirmationModal p,
[data-layout-theme="dark"] #siteVisitConfirmationModal span,
[data-layout-theme="dark"] #siteVisitConfirmationModal h1,
[data-layout-theme="dark"] #siteVisitConfirmationModal h2,
[data-layout-theme="dark"] #siteVisitConfirmationModal h3,
[data-layout-theme="dark"] #siteVisitConfirmationModal h4,
[data-layout-theme="dark"] #siteVisitConfirmationModal h5,
[data-layout-theme="dark"] #siteVisitConfirmationModal h6 {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] #plots-details-model .btn-close,
[data-layout-theme="dark"] #booking-enquiry-model .btn-close,
[data-layout-theme="dark"] #siteVisitBookingModal .btn-close,
[data-layout-theme="dark"] #siteVisitConfirmationModal .btn-close {
    filter: invert(1) grayscale(100%);
}

/* Dark form controls in booking / plot details / site visit */
[data-layout-theme="dark"] #plots-details-model .modal-body .form-control,
[data-layout-theme="dark"] #plots-details-model .modal-body .form-select,
[data-layout-theme="dark"] #plots-details-model .modal-body input:not([type="checkbox"]):not([type="radio"]),
[data-layout-theme="dark"] #plots-details-model .modal-body select,
[data-layout-theme="dark"] #plots-details-model .modal-body textarea,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body .form-control,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body .form-select,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body input:not([type="checkbox"]):not([type="radio"]),
[data-layout-theme="dark"] #booking-enquiry-model .modal-body select,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body textarea,
[data-layout-theme="dark"] #booking-enquiry-model .form-style1 .form-control,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body .form-control,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body .form-select,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body input:not([type="checkbox"]):not([type="radio"]),
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body select,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body textarea {
    background-color: #0f172a !important;
    border: 1px solid #475569 !important;
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
    box-shadow: none !important;
    outline: none !important;
}

[data-layout-theme="dark"] #plots-details-model .modal-body .form-control:focus,
[data-layout-theme="dark"] #plots-details-model .modal-body .form-select:focus,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body .form-control:focus,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body .form-select:focus,
[data-layout-theme="dark"] #booking-enquiry-model .form-style1 .form-control:focus,
[data-layout-theme="dark"] #booking-enquiry-model .form-style1 .form-control.active,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body .form-control:focus,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body .form-select:focus {
    background-color: #0f172a !important;
    border-color: #38bdf8 !important;
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

[data-layout-theme="dark"] #plots-details-model .modal-body .form-control::placeholder,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body .form-control::placeholder,
[data-layout-theme="dark"] #booking-enquiry-model .modal-body textarea::placeholder,
[data-layout-theme="dark"] #booking-enquiry-model .form-style1 .form-control::placeholder,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body .form-control::placeholder,
[data-layout-theme="dark"] #siteVisitBookingModal .modal-body textarea::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1;
}

[data-layout-theme="dark"] #siteVisitBookingModal .text-muted,
[data-layout-theme="dark"] #siteVisitConfirmationModal .text-muted,
[data-layout-theme="dark"] #booking-enquiry-model .text-muted,
[data-layout-theme="dark"] #booking-enquiry-model #enquiry-mini-text {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] #siteVisitBookingForm .form-label {
    color: #e2e8f0 !important;
}

/* Booking enquiry form card + fields */
[data-layout-theme="dark"] #booking-enquiry-model .home8-contact-form,
[data-layout-theme="dark"] #booking-enquiry-model .bgc-white {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
    border-radius: 16px;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] #booking-enquiry-model .form-title {
    color: #f8fafc !important;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

[data-layout-theme="dark"] #booking-enquiry-model .form-label,
[data-layout-theme="dark"] #booking-enquiry-model .form-style1 .form-label {
    color: #cbd5e1 !important;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

[data-layout-theme="dark"] #booking-enquiry-model .form-style1 .form-control {
    height: 48px;
    border-radius: 10px;
    font-size: 15px;
    padding: 12px 14px;
}

[data-layout-theme="dark"] #booking-enquiry-model .form-style1 textarea.form-control {
    height: auto;
    min-height: 110px;
}

[data-layout-theme="dark"] #booking-enquiry-model .error p {
    color: #fca5a5 !important;
    font-size: 12px;
    margin: 6px 0 0;
}

/*
 * Injected plot-details HTML — darken neutral white/gray panels only.
 * Do NOT match status chip pastels (#ecfdf5 / #eff6ff / #fef2f2 / #f0fdf4)
 * or those chips lose Available/Hold/Booked colors (Hold became invisible).
 */
[data-layout-theme="dark"] #modal-plots-details [style*="background:#fff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #fff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#ffffff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #ffffff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f8fafc"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f8fafc"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f9fafb"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f9fafb"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f1f5f9"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f1f5f9"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f3f4f6"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f3f4f6"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#fffbeb"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #fffbeb"],
[data-layout-theme="dark"] #modal-plots-details [style*="background:#f0f9ff"],
[data-layout-theme="dark"] #modal-plots-details [style*="background: #f0f9ff"] {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

/* Neutral body copy only — leave status greens/blues/reds to the chip rules */
[data-layout-theme="dark"] #modal-plots-details [style*="color:#111"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #111"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#1f2937"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #1f2937"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#374151"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #374151"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#4b5563"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #4b5563"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#6b7280"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #6b7280"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#9ca3af"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #9ca3af"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#92400e"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #92400e"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#111"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #111"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#1f2937"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #1f2937"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#374151"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #374151"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#4b5563"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #4b5563"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#6b7280"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #6b7280"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#9ca3af"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #9ca3af"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#92400e"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #92400e"] {
    color: #e2e8f0 !important;
}

/* Share / welcome popups */
[data-layout-theme="dark"] .share-popup,
[data-layout-theme="dark"] .welcome-popup {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155;
}

[data-layout-theme="dark"] .share-popup-header h5,
[data-layout-theme="dark"] .welcome-popup h3 {
    color: #f8fafc !important;
}

[data-layout-theme="dark"] .welcome-popup .company-name,
[data-layout-theme="dark"] .welcome-popup p.company-name {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .welcome-popup .browse-text,
[data-layout-theme="dark"] .welcome-popup p.browse-text {
    color: #34d399 !important;
}

[data-layout-theme="dark"] .welcome-popup .instructions,
[data-layout-theme="dark"] .welcome-popup .instructions p,
[data-layout-theme="dark"] .welcome-popup .instructions span,
[data-layout-theme="dark"] .welcome-popup .instructions strong,
[data-layout-theme="dark"] .welcome-popup .instructions li {
    color: #cbd5e1 !important;
}

[data-layout-theme="dark"] .welcome-popup .instructions {
    background: #0f172a !important;
}

[data-layout-theme="dark"] .welcome-popup .instructions i {
    color: #38bdf8 !important;
}

[data-layout-theme="dark"] .welcome-popup .progress-bar {
    background: #334155 !important;
}

[data-layout-theme="dark"] .share-popup p,
[data-layout-theme="dark"] .share-popup span,
[data-layout-theme="dark"] .share-popup h5,
[data-layout-theme="dark"] .share-popup label {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .share-popup-close {
    background: #334155 !important;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .share-popup-close:hover {
    background: #475569 !important;
}

[data-layout-theme="dark"] .copy-link-input {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

/* Tracking / verify-profile popup — dark chrome matching layout */
[data-layout-theme="dark"] .tracking-overlay {
    color-scheme: dark;
}

[data-layout-theme="dark"] .tracking-popup {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55) !important;
}

[data-layout-theme="dark"] .tracking-popup h3,
[data-layout-theme="dark"] .tracking-popup-header h3 {
    color: #f8fafc !important;
}

[data-layout-theme="dark"] .tracking-popup p,
[data-layout-theme="dark"] .tracking-popup span,
[data-layout-theme="dark"] .tracking-popup label,
[data-layout-theme="dark"] .tracking-popup-header p,
[data-layout-theme="dark"] .tracking-form-group label,
[data-layout-theme="dark"] .tracking-country-dropdown,
[data-layout-theme="dark"] .tracking-country-item,
[data-layout-theme="dark"] .tracking-country-list {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .tracking-form-group input,
[data-layout-theme="dark"] .tracking-form-group input:focus,
[data-layout-theme="dark"] .tracking-popup input:not([type="checkbox"]):not([type="radio"]),
[data-layout-theme="dark"] .tracking-popup textarea,
[data-layout-theme="dark"] .tracking-popup select {
    background: #0f172a !important;
    border: 1px solid #475569 !important;
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
}

[data-layout-theme="dark"] .tracking-form-group input::placeholder,
[data-layout-theme="dark"] .tracking-popup input::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1;
}

[data-layout-theme="dark"] .tracking-country-dropdown {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .tracking-country-list {
    background: #1e293b !important;
    border-color: #475569 !important;
}

[data-layout-theme="dark"] .tracking-country-item:hover {
    background: #334155 !important;
}

[data-layout-theme="dark"] .tracking-country-item.selected {
    background: #0c4a6e !important;
    color: #7dd3fc !important;
}

[data-layout-theme="dark"] .tracking-otp-info {
    background: #0c4a6e !important;
    border-color: #0369a1 !important;
    color: #e0f2fe !important;
}

[data-layout-theme="dark"] .tracking-otp-info p,
[data-layout-theme="dark"] .tracking-otp-info span {
    color: #e0f2fe !important;
}

[data-layout-theme="dark"] .project-page-tabs {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-layout-theme="dark"] .project-tab-link {
    background: rgba(51, 65, 85, 0.55);
    border-color: rgba(148, 163, 184, 0.25);
}

[data-layout-theme="dark"] .project-tab-link .tab-icon,
[data-layout-theme="dark"] .project-tab-link .tab-text-line {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .project-tab-link:hover .tab-icon,
[data-layout-theme="dark"] .project-tab-link:hover .tab-text-line {
    color: #7dd3fc !important;
}

[data-layout-theme="dark"] .project-tab-link.active .tab-icon,
[data-layout-theme="dark"] .project-tab-link.active .tab-text-line,
[data-layout-theme="dark"] .project-tab-link.active:hover .tab-icon,
[data-layout-theme="dark"] .project-tab-link.active:hover .tab-text-line {
    color: #fff !important;
}

/* jQuery UI dialog / datepicker surfaces if present */
[data-layout-theme="dark"] .ui-widget-content {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

[data-layout-theme="dark"] .ui-widget-header {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

[data-layout-theme="dark"] .ui-state-default {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

/* Tables inside modals / popups */
[data-layout-theme="dark"] .table {
    color: #e2e8f0;
}

[data-layout-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    border-color: #334155;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
}

/* Card / list groups used in layout chrome */
[data-layout-theme="dark"] .card {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .list-group-item {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

/* Links that rely on default dark text */
[data-layout-theme="dark"] a:not(.stat-chip):not(.btn):not([style*="color:deeppink"]):not([style*="color: deeppink"]) {
    color: #7dd3fc;
}

[data-layout-theme="dark"] a:not(.stat-chip):not(.btn):hover {
    color: #bae6fd;
}

/* =========================================================
   Gallery + Location map pages (ultra-modern / map chrome)
   ========================================================= */

[data-layout-theme="dark"] {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    /* Headings / primary text on dark */
    --color-primary: #f1f5f9;
    --color-accent: #38bdf8;
    --color-accent-hover: #7dd3fc;
    --color-text-main: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text: #e2e8f0;
    --color-border: #334155;
}

[data-layout-theme="dark"] body {
    background-color: var(--color-bg) !important;
    color: var(--color-text-main);
}

[data-layout-theme="dark"] .page-header {
    background: rgba(15, 23, 42, 0.92) !important;
    border-bottom: 1px solid #334155;
    backdrop-filter: blur(10px);
}

[data-layout-theme="dark"] .page-header h1,
[data-layout-theme="dark"] .page-header h2,
[data-layout-theme="dark"] .page-header h3,
[data-layout-theme="dark"] .project-info-section,
[data-layout-theme="dark"] .project-info-section p,
[data-layout-theme="dark"] .project-info-section span,
[data-layout-theme="dark"] .project-info-section h1,
[data-layout-theme="dark"] .project-info-section h2,
[data-layout-theme="dark"] .project-info-section h3,
[data-layout-theme="dark"] .project-info-section h4 {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .project-info-section {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* Badges that used --color-primary as bg (now light text color) */
[data-layout-theme="dark"] .project-info-section [style*="background: var(--color-primary"] {
    background: #0284c7 !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .accordion-item {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: none !important;
}

[data-layout-theme="dark"] .accordion-header {
    background: linear-gradient(to right, #1e293b, #0f172a) !important;
}

[data-layout-theme="dark"] .accordion-header:hover {
    background: #273549 !important;
}

[data-layout-theme="dark"] .accordion-header h3 {
    color: #f1f5f9 !important;
}

[data-layout-theme="dark"] .accordion-header.open h3 {
    color: #7dd3fc !important;
}

[data-layout-theme="dark"] .accordion-content {
    background: #0f172a !important;
    border-top-color: #334155 !important;
}

[data-layout-theme="dark"] .accordion-content h4,
[data-layout-theme="dark"] .accordion-content p,
[data-layout-theme="dark"] .accordion-content span,
[data-layout-theme="dark"] .accordion-content li,
[data-layout-theme="dark"] .accordion-content label {
    color: #e2e8f0 !important;
}

/* Hardcoded light-theme pricing / gallery inline colors */
[data-layout-theme="dark"] .accordion-content [style*="color: #374151"],
[data-layout-theme="dark"] .accordion-content [style*="color:#374151"],
[data-layout-theme="dark"] .accordion-content [style*="color: #1f2937"],
[data-layout-theme="dark"] .accordion-content [style*="color:#1f2937"],
[data-layout-theme="dark"] .accordion-content [style*="color: #166534"],
[data-layout-theme="dark"] .accordion-content [style*="color:#166534"],
[data-layout-theme="dark"] .accordion-content [style*="color: #6b7280"],
[data-layout-theme="dark"] .accordion-content [style*="color:#6b7280"],
[data-layout-theme="dark"] .accordion-content [style*="color: #4338ca"],
[data-layout-theme="dark"] .accordion-content [style*="color:#4338ca"] {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .accordion-content [style*="background: white"],
[data-layout-theme="dark"] .accordion-content [style*="background:white"],
[data-layout-theme="dark"] .accordion-content [style*="background: #fff"],
[data-layout-theme="dark"] .accordion-content [style*="background:#fff"] {
    background: #1e293b !important;
    border-color: #475569 !important;
}

[data-layout-theme="dark"] .accordion-content [style*="background: linear-gradient(135deg, #f0fdf4"],
[data-layout-theme="dark"] .accordion-content [style*="background:#e0e7ff"],
[data-layout-theme="dark"] .accordion-content [style*="background: #e0e7ff"] {
    background: #0f172a !important;
    border-color: #475569 !important;
}

[data-layout-theme="dark"] .gallery-card,
[data-layout-theme="dark"] .doc-card {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .gallery-card h4,
[data-layout-theme="dark"] .doc-card h4 {
    color: #f1f5f9 !important;
}

[data-layout-theme="dark"] .btn-outline {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .btn-outline:hover {
    background: #334155 !important;
    border-color: #38bdf8 !important;
    color: #7dd3fc !important;
}

[data-layout-theme="dark"] .btn-primary {
    background: #0284c7 !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .btn-primary:hover {
    background: #0369a1 !important;
}

[data-layout-theme="dark"] .icon-toggle {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .overlay-content {
    color: #0f172a !important;
}

/* Inventory / pricing link that used --color-primary as bg */
[data-layout-theme="dark"] .accordion-content a[style*="background: var(--color-primary"],
[data-layout-theme="dark"] .accordion-content a[style*="background:var(--color-primary"] {
    background: #0284c7 !important;
    color: #fff !important;
}

/* Location map sidebar / bottom sheet */
[data-layout-theme="dark"] .map-sidebar {
    background: #0f172a !important;
    border-right-color: #334155 !important;
    color: #e2e8f0;
}

[data-layout-theme="dark"] .map-sidebar .sidebar-header {
    border-bottom-color: #334155 !important;
}

[data-layout-theme="dark"] .map-sidebar .sidebar-header h1 {
    color: #f1f5f9 !important;
}

[data-layout-theme="dark"] .category-title {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .highlight-item:hover {
    background: #1e293b !important;
}

[data-layout-theme="dark"] .highlight-name {
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .highlight-distance {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .address-text {
    color: #cbd5e1 !important;
}

[data-layout-theme="dark"] .city-text {
    color: #7dd3fc !important;
}

[data-layout-theme="dark"] .action-btn {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

[data-layout-theme="dark"] .action-btn:hover {
    background: #334155 !important;
    border-color: #64748b !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .action-btn.primary {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .action-btn.primary:hover {
    background: #0369a1 !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .map-control-btn {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

[data-layout-theme="dark"] .map-control-btn:hover {
    background: #334155 !important;
    color: #fff !important;
}

[data-layout-theme="dark"] .bottom-sheet {
    background: #0f172a !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

[data-layout-theme="dark"] .bottom-sheet-handle {
    background: #475569 !important;
}

[data-layout-theme="dark"] .bottom-sheet-peek h2 {
    color: #f1f5f9 !important;
}

[data-layout-theme="dark"] .bottom-sheet-peek .peek-subtitle {
    color: #94a3b8 !important;
}

[data-layout-theme="dark"] .legacy-highlights li {
    color: #cbd5e1 !important;
}

[data-layout-theme="dark"] .street-view-btn {
    background: #1e293b !important;
}

[data-layout-theme="dark"] .street-view-btn:hover {
    background: #334155 !important;
}

/* Filter modal status line */
[data-layout-theme="dark"] #filter-plots-status {
    color: #cbd5e1 !important;
}

/* Tables inside plot-details / booking — stay dark readable */
[data-layout-theme="dark"] #plots-details-model .table,
[data-layout-theme="dark"] #plots-details-model .table > :not(caption) > * > *,
[data-layout-theme="dark"] #booking-enquiry-model .table,
[data-layout-theme="dark"] #booking-enquiry-model .table > :not(caption) > * > * {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    background-color: transparent !important;
}

[data-layout-theme="dark"] #plots-details-model a:not(.btn),
[data-layout-theme="dark"] #booking-enquiry-model a:not(.btn) {
    color: #7dd3fc !important;
}

/*
 * FINAL cascade: status chips in tippy + plot-details popup.
 * Must stay last so Available (green) / Hold (blue) / Booked (red) beat
 * blanket span/div light-text rules.
 */
[data-layout-theme="dark"] .tippy-content span[style*="background:#ecfdf5"],
[data-layout-theme="dark"] .tippy-content span[style*="background: #ecfdf5"],
[data-layout-theme="dark"] .tippy-content span[style*="background:#f0fdf4"],
[data-layout-theme="dark"] .tippy-content span[style*="background: #f0fdf4"],
[data-layout-theme="dark"] #plots-details-model span[style*="background:#ecfdf5"],
[data-layout-theme="dark"] #plots-details-model span[style*="background: #ecfdf5"],
[data-layout-theme="dark"] #plots-details-model span[style*="background:#f0fdf4"],
[data-layout-theme="dark"] #plots-details-model span[style*="background: #f0fdf4"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background:#ecfdf5"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background: #ecfdf5"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background:#f0fdf4"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background: #f0fdf4"],
[data-layout-theme="dark"] #modal-plots-details div[style*="background:#f0fdf4"],
[data-layout-theme="dark"] #modal-plots-details div[style*="background: #f0fdf4"] {
    background: #14532d !important;
    border-color: #22c55e !important;
    color: #bbf7d0 !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="background:#eff6ff"],
[data-layout-theme="dark"] .tippy-content span[style*="background: #eff6ff"],
[data-layout-theme="dark"] #plots-details-model span[style*="background:#eff6ff"],
[data-layout-theme="dark"] #plots-details-model span[style*="background: #eff6ff"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background:#eff6ff"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background: #eff6ff"] {
    background: #1e3a8a !important;
    border-color: #60a5fa !important;
    color: #bfdbfe !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="background:#fef2f2"],
[data-layout-theme="dark"] .tippy-content span[style*="background: #fef2f2"],
[data-layout-theme="dark"] #plots-details-model span[style*="background:#fef2f2"],
[data-layout-theme="dark"] #plots-details-model span[style*="background: #fef2f2"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background:#fef2f2"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background: #fef2f2"],
[data-layout-theme="dark"] #modal-plots-details div[style*="background:#fef2f2"],
[data-layout-theme="dark"] #modal-plots-details div[style*="background: #fef2f2"] {
    background: #7f1d1d !important;
    border-color: #f87171 !important;
    color: #fecaca !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="color:#166534"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #166534"],
[data-layout-theme="dark"] .tippy-content span[style*="color:#065f46"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #065f46"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#166534"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #166534"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#065f46"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #065f46"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#166534"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #166534"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#065f46"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #065f46"] {
    color: #bbf7d0 !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="color:#1d4ed8"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #1d4ed8"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#1d4ed8"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #1d4ed8"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#1d4ed8"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #1d4ed8"] {
    color: #bfdbfe !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="color:#991b1b"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #991b1b"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#991b1b"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #991b1b"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#991b1b"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #991b1b"] {
    color: #fecaca !important;
}

/* Type / ownership accent chips inside popups */
[data-layout-theme="dark"] .tippy-content span[style*="background:#e0e7ff"],
[data-layout-theme="dark"] .tippy-content span[style*="background: #e0e7ff"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background:#e0e7ff"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background: #e0e7ff"],
[data-layout-theme="dark"] #plots-details-model span[style*="background:#e0e7ff"],
[data-layout-theme="dark"] #plots-details-model span[style*="background: #e0e7ff"] {
    background: #312e81 !important;
    border-color: #818cf8 !important;
    color: #c7d2fe !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="color:#4338ca"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #4338ca"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#4338ca"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #4338ca"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#4338ca"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #4338ca"] {
    color: #c7d2fe !important;
}

/*
 * Unit type chips from buildPlotPopupPlotTypeChipsHtml (#f5f3ff / #5b21b6).
 * Blanket tippy/modal light-text left these light-on-lavender (invisible).
 */
[data-layout-theme="dark"] .tippy-content span[style*="background:#f5f3ff"],
[data-layout-theme="dark"] .tippy-content span[style*="background: #f5f3ff"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background:#f5f3ff"],
[data-layout-theme="dark"] #modal-plots-details span[style*="background: #f5f3ff"],
[data-layout-theme="dark"] #plots-details-model span[style*="background:#f5f3ff"],
[data-layout-theme="dark"] #plots-details-model span[style*="background: #f5f3ff"] {
    background: #4c1d95 !important;
    border-color: #a78bfa !important;
    color: #ede9fe !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="color:#5b21b6"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #5b21b6"],
[data-layout-theme="dark"] .tippy-content [style*="color:#5b21b6"],
[data-layout-theme="dark"] .tippy-content [style*="color: #5b21b6"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#5b21b6"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #5b21b6"],
[data-layout-theme="dark"] #modal-plots-details [style*="color:#5b21b6"],
[data-layout-theme="dark"] #modal-plots-details [style*="color: #5b21b6"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#5b21b6"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #5b21b6"],
[data-layout-theme="dark"] #plots-details-model [style*="color:#5b21b6"],
[data-layout-theme="dark"] #plots-details-model [style*="color: #5b21b6"] {
    color: #ede9fe !important;
}

[data-layout-theme="dark"] .tippy-content span[style*="color:#047857"],
[data-layout-theme="dark"] .tippy-content span[style*="color: #047857"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color:#047857"],
[data-layout-theme="dark"] #modal-plots-details span[style*="color: #047857"],
[data-layout-theme="dark"] #plots-details-model span[style*="color:#047857"],
[data-layout-theme="dark"] #plots-details-model span[style*="color: #047857"] {
    color: #6ee7b7 !important;
}
