/**
 * Dark theme for dashboard-style routes (dashboard, sell, banks, buy, agents).
 * Keeps .tb-sell-nav-link--active / --seller-brand blue where applicable.
 */

html.dark body {
    background-color: #0f172a !important;
    color: #ffffff;
}

html.dark body.tb-sell-body {
    --sell-bg: #0f172a;
    background-color: #0f172a !important;
    color: #e5e7eb;
}

html.dark header.dashboard-main-header {
    background-color: #020617 !important;
    border-color: #1e293b !important;
    box-shadow: 0 1px 0 0 rgb(30 41 59 / 0.8);
}

html.dark #sidebar.tb-sell-sidebar,
html.dark #sell-sidebar.tb-sell-sidebar {
    background-color: #020617 !important;
    border-color: #1e293b !important;
    box-shadow: 4px 0 24px -4px rgba(0, 0, 0, 0.45);
}

html.dark .tb-sell-sidebar .border-slate-100,
html.dark .tb-sell-sidebar .border-slate-200 {
    border-color: #1e293b !important;
}

html.dark .tb-sell-sidebar-section-title,
html.dark #sidebar .tb-sell-sidebar-section-title {
    color: #9ca3af !important;
}

html.dark .tb-sell-nav-link:not(.tb-sell-nav-link--active):not(.tb-sell-nav-link--seller-brand) {
    color: #d1d5db !important;
}

html.dark .tb-sell-nav-link:not(.tb-sell-nav-link--active):not(.tb-sell-nav-link--seller-brand) .tb-sell-nav-link-icon-muted {
    color: #9ca3af !important;
}

html.dark .tb-sell-nav-link:not(.tb-sell-nav-link--active):not(.tb-sell-nav-link--seller-brand):hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

html.dark .tb-sell-nav-link:not(.tb-sell-nav-link--active):not(.tb-sell-nav-link--seller-brand):hover .tb-sell-nav-link-icon-muted {
    color: #e5e7eb !important;
}

html.dark #sell-sidebar-name,
html.dark #sidebar .tb-sell-sidebar-profile-card,
html.dark #sell-sidebar .tb-sell-sidebar-profile-card {
    color: #f9fafb;
}

html.dark #sell-sidebar-email,
html.dark #sidebar #sell-sidebar-email {
    color: #9ca3af !important;
}

html.dark .tb-sell-sidebar-profile-card {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

html.dark .tb-sell-sidebar-avatar {
    background-color: #1e293b !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

html.dark #sell-sidebar-avatar-initial {
    color: #cbd5e1 !important;
}

html.dark .tb-sell-sidebar-logout:hover {
    background-color: rgba(244, 63, 94, 0.12) !important;
}

/* Sell header strip */
html.dark .tb-sell-header {
    background-color: #020617 !important;
    border-color: #1e293b !important;
}

html.dark .tb-sell-header-brand .text-slate-900 {
    color: #ffffff !important;
}

html.dark .tb-sell-header-search,
html.dark .tb-sell-header-search-field input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f9fafb !important;
}

html.dark .tb-sell-header-rule {
    background-color: #334155 !important;
}

html.dark .tb-sell-header-inner .text-slate-600,
html.dark .tb-sell-header-inner .text-slate-400 {
    color: #9ca3af !important;
}

html.dark .tb-sell-header-util {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html.dark .tb-sell-header-icon-btn:hover {
    background-color: #1e293b !important;
}

/* Sell main workspace */
html.dark #postPropFormContainer main {
    background-color: #0f172a !important;
}

html.dark .tb-sell-listing-page-title,
html.dark .tb-sell-form-label,
html.dark h1.text-slate-900,
html.dark h2.text-slate-900,
html.dark h3.text-slate-900 {
    color: #ffffff !important;
}

html.dark .tb-sell-listing-page-subtitle,
html.dark .tb-sell-wizard-card,
html.dark .text-slate-600 {
    color: #9ca3af !important;
}

html.dark .tb-sell-wizard-card,
html.dark .tb-sell-input,
html.dark select.tb-sell-input,
html.dark .rounded-2xl.border.border-slate-200.bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f9fafb !important;
}

html.dark .tb-sell-input::placeholder {
    color: #64748b !important;
}

html.dark .sell-step-head-label {
    color: #d1d5db !important;
}

html.dark .sell-step-head-label--current {
    color: #ffffff !important;
}

html.dark #login-prompt .rounded-2xl.border {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #login-prompt h2,
html.dark #login-prompt .text-slate-900 {
    color: #ffffff !important;
}

html.dark #authModal .rounded-2xl {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #authModal .text-slate-900,
html.dark #authModal .text-gray-800 {
    color: #f3f4f6 !important;
}

/* Mortgage calculator (when mounted inside dashboards) */
html.dark #hybrid-calculator-container .rounded-2xl.border.border-slate-100,
html.dark #hybrid-calculator-container .rounded-2xl.border.border-slate-200,
html.dark #hybrid-calculator-container .divide-y {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #hybrid-calculator-container .text-slate-900,
html.dark #hybrid-calculator-container .text-slate-800 {
    color: #f9fafb !important;
}

html.dark #hybrid-calculator-container .text-slate-600,
html.dark #hybrid-calculator-container .text-slate-500 {
    color: #9ca3af !important;
}

html.dark #hybrid-calculator-container input[type="number"],
html.dark #hybrid-calculator-container input.rounded-xl {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

html.dark #hybrid-calculator-container .rounded-2xl.border.bg-white[data-tb-emc-bank-card],
html.dark #hybrid-calculator-container button[data-tb-emc-bank-card] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #hybrid-calculator-container .rounded-full.bg-slate-100 {
    background-color: #334155 !important;
    color: #e5e7eb !important;
}

/* Mobile bottom nav on dashboards */
html.dark .tb-mobile-nav {
    background-color: #020617 !important;
    border-color: #1e293b !important;
}

html.dark .tb-mobile-nav a,
html.dark .tb-mobile-nav button {
    color: #9ca3af !important;
}

html.dark .tb-mobile-nav .tb-mobile-nav__active {
    color: #006aff !important;
}

/* Chatbot */
html.dark .chatbot-wrapper {
    filter: none;
}

/* Sidebar backdrop */
html.dark .sell-sidebar-backdrop--visible,
html.dark #sidebar-backdrop.sell-sidebar-backdrop--visible {
    background-color: rgba(2, 6, 23, 0.65) !important;
}

/* Dashboard main panels & cards */
html.dark main .rounded-2xl.border.border-slate-200.bg-white,
html.dark main .rounded-xl.border.border-slate-200.bg-white,
html.dark main .rounded-2xl.border.border-slate-200.bg-slate-50,
html.dark main article.rounded-2xl.border.border-slate-200 {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark main .bg-slate-50:not(.bg-emerald-50):not(.bg-sky-100):not(.bg-amber-50) {
    background-color: #0f172a !important;
}

html.dark main .text-slate-900,
html.dark main .text-black {
    color: #ffffff !important;
}

html.dark main .text-slate-600,
html.dark main .text-slate-700 {
    color: #9ca3af !important;
}

html.dark main .text-slate-500 {
    color: #9ca3af !important;
}

html.dark main .border-slate-100 {
    border-color: #334155 !important;
}

html.dark #account-edit-modal .max-h-\[90vh\] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #account-edit-modal .text-black,
html.dark #account-edit-modal .text-slate-800 {
    color: #f9fafb !important;
}

html.dark #account-edit-modal input,
html.dark #account-edit-modal textarea {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

html.dark #postPaymentModal .registration-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #postPaymentModal .text-gray-900,
html.dark #postPaymentModal h3 {
    color: #f9fafb !important;
}

html.dark #postPaymentModal .rounded-2xl.border.border-slate-200.bg-slate-50 {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

/* Sell wizard typography (defined in sell-dashboard.css) */
html.dark .tb-sell-listing-page-title,
html.dark .tb-sell-wizard-section-title {
    color: #ffffff !important;
}

html.dark .tb-sell-listing-page-subtitle,
html.dark .tb-sell-wizard-section-desc {
    color: #9ca3af !important;
}

/* —— Global sticky header (site-header.css) —— */
html.dark .tb-site-header {
    background: #020617 !important;
    border-bottom-color: #1e293b !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

html.dark .tb-site-header .tb-nav-pill:not(.tb-nav-pill--active) {
    color: #cbd5e1 !important;
}

html.dark .tb-site-header .tb-nav-pill:not(.tb-nav-pill--active):hover {
    background-color: rgba(0, 106, 255, 0.12) !important;
    color: #60a5fa !important;
}

html.dark .tb-nav-pill.tb-nav-pill--active {
    color: #60a5fa !important;
    background-color: rgba(0, 106, 255, 0.18) !important;
}

html.dark .tb-site-header #langBtn {
    border-color: #334155 !important;
    background-color: #0f172a !important;
    color: #e5e7eb !important;
}

html.dark .tb-site-header #menuBtn {
    color: #e5e7eb !important;
}

html.dark .tb-site-header #menuBtn:hover {
    background-color: #1e293b !important;
}

html.dark .tb-site-header #auth-btns a,
html.dark .tb-site-header #auth-btns button {
    border-color: #334155 !important;
}

html.dark .tb-site-header #auth-btns a.border-gray-200,
html.dark .tb-site-header #auth-btns a[class*="border-gray"] {
    background-color: #0f172a !important;
    color: #e5e7eb !important;
}

html.dark .tb-site-header #userNameDisplay {
    color: #e5e7eb !important;
}

html.dark .tb-site-header #logoutBtn {
    border-color: rgba(244, 63, 94, 0.35) !important;
    background-color: #0f172a !important;
    color: #fda4af !important;
}

/* —— Vertical MD rail (banks, agents) —— */
html.dark aside.fixed.left-0.border-gray-200.bg-white {
    background-color: #020617 !important;
    border-color: #1e293b !important;
}

html.dark aside.fixed.left-0 .text-gray-500,
html.dark aside.fixed.left-0 .text-gray-400 {
    color: #9ca3af !important;
}

html.dark aside.fixed.left-0 a.text-zillow .fa,
html.dark aside.fixed.left-0 a.text-zillow span {
    color: inherit;
}

/* —— Bank Auctions —— */
html.dark #sidebar.banks-sidebar,
html.dark #sidebar.banks-sidebar.bg-white {
    background-color: #020617 !important;
    border-color: #1e293b !important;
}

html.dark #sidebar.banks-sidebar .border-slate-100,
html.dark #sidebar.banks-sidebar .border-slate-200 {
    border-color: #334155 !important;
}

html.dark #sidebar.banks-sidebar .text-slate-500,
html.dark #sidebar.banks-sidebar .text-slate-600,
html.dark #sidebar.banks-sidebar .text-slate-700 {
    color: #cbd5e1 !important;
}

html.dark #sidebar.banks-sidebar a:hover,
html.dark #sidebar.banks-sidebar .hover\:bg-slate-50:hover {
    background-color: #1e293b !important;
}

html.dark main .rounded-2xl.border.border-slate-200.bg-amber-50,
html.dark main span.rounded-full.bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #fcd34d !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}

html.dark main article button.border-slate-200.bg-white,
html.dark main .rounded-2xl button.border-slate-200 {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

html.dark main article button.border-slate-200.bg-white:hover {
    border-color: #006aff !important;
    color: #93c5fd !important;
}

/* —— Buy Property (markup uses #buy-main, not <main>) —— */
html.dark #buy-main section.border-b.border-slate-200.bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #buy-main .mx-auto.max-w-7xl.bg-white {
    background-color: #0f172a !important;
}

html.dark #buy-main .text-slate-900,
html.dark #buy-main h1.text-slate-900 {
    color: #f9fafb !important;
}

html.dark #buy-main .text-slate-500,
html.dark #buy-main .text-slate-600 {
    color: #9ca3af !important;
}

html.dark .buy-browse-toolbar .buy-filter-select,
html.dark .buy-filter-select {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
}

html.dark .buy-browse-search {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #f9fafb !important;
}

html.dark .buy-browse-search:focus {
    border-color: #006aff !important;
    box-shadow: 0 0 0 2px rgba(0, 106, 255, 0.25);
}

html.dark .buy-view-segment {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #475569 !important;
}

html.dark .buy-view-toggle:not(.is-active) {
    color: #94a3b8 !important;
}

html.dark .buy-view-toggle.is-active {
    background: rgba(0, 106, 255, 0.22) !important;
    color: #93c5fd !important;
    box-shadow: none !important;
}

html.dark .buy-view-toggle:not(.is-active):hover {
    color: #93c5fd !important;
    background: #334155 !important;
}

html.dark #buy-main #moreFiltersBtn {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e5e7eb !important;
}

html.dark #buy-main #moreFiltersBtn:hover {
    background-color: #334155 !important;
}

html.dark #buy-main #moreFiltersPanel {
    border-color: #334155 !important;
}

html.dark #buy-main #loadMoreBtn {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e5e7eb !important;
}

html.dark #buy-main #loadMoreBtn:hover:enabled {
    background-color: #334155 !important;
}

html.dark #buy-main .rounded-2xl.border.border-slate-200.bg-white,
html.dark #buy-main article.rounded-2xl.border.border-slate-200,
html.dark #buy-main .border-slate-200.bg-white.shadow-sm {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #buy-main .border-slate-200\/90.bg-white,
html.dark #buy-main button.border-slate-200\/90 {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e5e7eb !important;
}

html.dark #buy-main button.border-slate-200.bg-slate-100,
html.dark #buy-main .border-slate-200.bg-slate-100 {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

html.dark #buy-main .border-slate-100.bg-slate-50 {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html.dark #buy-main .border-slate-200\/80.bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #login-prompt .rounded-3xl.border {
    background-color: rgba(30, 41, 59, 0.92) !important;
    border-color: #334155 !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

html.dark #login-prompt .text-slate-900 {
    color: #f9fafb !important;
}

html.dark #login-prompt .text-slate-600 {
    color: #9ca3af !important;
}

html.dark #authModal > div.rounded-3xl {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark #authModal .text-slate-900,
html.dark #authModal #authTitle {
    color: #f9fafb !important;
}

html.dark #authModal input.border-slate-200 {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f9fafb !important;
}

html.dark #authModal #toggleText.text-slate-600 {
    color: #9ca3af !important;
}

html.dark #authModal button[onclick*="handleGoogleLogin"] {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e5e7eb !important;
}

html.dark #propertyModal > div.rounded-3xl {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

html.dark section#mortgage-calculator {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

html.dark #propertyModal .text-slate-900,
html.dark #propertyModal .text-slate-800 {
    color: #f9fafb !important;
}

html.dark #propertyModal .text-slate-600,
html.dark #propertyModal .text-slate-500 {
    color: #9ca3af !important;
}

/* —— Agents portal —— */
html.dark #agent-drawer,
html.dark #agent-drawer.bg-white {
    background-color: #020617 !important;
    border-color: #1e293b !important;
}

html.dark #agent-drawer .text-slate-500,
html.dark #agent-drawer .text-slate-400,
html.dark #agent-drawer .text-slate-700 {
    color: #cbd5e1 !important;
}

html.dark #agent-drawer a:hover {
    background-color: #1e293b !important;
}

html.dark #verified-agents-directory {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

html.dark #verified-agents-directory .border-slate-200.bg-white,
html.dark #verified-agents-directory input[type="search"],
html.dark #verified-agents-directory select {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

html.dark #verified-agents-directory .text-slate-900 {
    color: #f9fafb !important;
}

html.dark #verified-agents-directory .text-slate-600,
html.dark #verified-agents-directory .text-slate-700,
html.dark #verified-agents-directory .text-slate-500 {
    color: #9ca3af !important;
}

html.dark #verified-agents-directory article .border-zillow.bg-white {
    background-color: #0f172a !important;
    color: #7dd3fc !important;
}

html.dark #verified-agents-directory article .border-zillow.bg-white:hover {
    background-color: #1e293b !important;
}

html.dark main a.inline-flex.h-11.rounded-xl.border-2.border-zillow.bg-white {
    background-color: #0f172a !important;
    color: #7dd3fc !important;
}

html.dark main a.inline-flex.h-11.rounded-xl.border-2.border-zillow.bg-white:hover {
    background-color: #1e293b !important;
}

html.dark #verified-agents-directory button.border-slate-200.bg-white {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e5e7eb !important;
}

/* —— Mobile floating menu (buy) —— */
html.dark .tb-mobile-menu-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.25),
        0 8px 24px rgba(0, 0, 0, 0.35);
}

html.dark .tb-mobile-menu-card a,
html.dark .tb-mobile-menu-card button {
    color: #e5e7eb !important;
}

html.dark .tb-mobile-menu-card .border-slate-100,
html.dark .tb-mobile-menu-card .border-slate-200 {
    border-color: #334155 !important;
}
