:root { --theme-bg:#f5f1e8; --theme-panel:#fff; --theme-text:#202622; --theme-muted:#5e665f; --theme-line:#d9d5cd; }
:root[data-theme="dark"] { color-scheme:dark; --theme-bg:#121514; --theme-panel:#202622; --theme-text:#f2efe8; --theme-muted:#c0c5bf; --theme-line:#4a514b; --color-surface:18 21 20; --color-dark-text:242 239 232; --hex-surface:#121514; --hex-dark-text:#f2efe8; }
#leilancer-theme-toggle { position:fixed; left:max(12px,env(safe-area-inset-left)); bottom:max(12px,env(safe-area-inset-bottom)); z-index:1100; padding:10px 14px; border:1px solid #C49A50; border-radius:24px; background:var(--theme-panel); color:var(--theme-text); font:600 13px/1.4 system-ui,sans-serif; box-shadow:0 3px 15px #0003; cursor:pointer; min-height:44px; }
.lc-topbar #leilancer-theme-toggle { position:static; flex-shrink:0; white-space:nowrap; box-shadow:none; margin-left:auto; }
.lc-topbar > .flex-1 { min-width:0; }
@media (max-width:480px) { .lc-topbar #leilancer-theme-toggle { padding:8px; font-size:11px; } }
#leilancer-theme-toggle:focus-visible { outline:3px solid #C49A50; outline-offset:3px; }
html[data-theme="dark"] body { background-color:var(--theme-bg); color:var(--theme-text); }
html[data-theme="dark"] :is(.bg-white,.bg-gray-50,.bg-gray-100,.bg-zinc-50,.bg-zinc-100,.bg-surface,.card,.leilao-card,.calculadora-container,.calculadora-form,.resultado-container,.modal-content,.filter-sidebar,.filtros-container) { background-color:var(--theme-panel)!important; color:var(--theme-text); }
html[data-theme="dark"] :is([style*="background-color: rgb(255, 255, 255)"],[style*="background: rgb(255, 255, 255)"],[style*="background: #fff"],[style*="background-color: #fff"]) { background-color:var(--theme-panel)!important; color:var(--theme-text)!important; }
html[data-theme="dark"] :is(.text-dark-text,.text-gray-900,.text-gray-800,.text-gray-700,.text-zinc-900,.text-zinc-800,.text-zinc-700,.text-dark) { color:var(--theme-text)!important; }
html[data-theme="dark"] :is(.text-gray-600,.text-gray-500,.text-zinc-600,.text-zinc-500) { color:var(--theme-muted)!important; }
html[data-theme="dark"] :is(.border-gray-200,.border-gray-300,.border-zinc-200,.border-zinc-300) { border-color:var(--theme-line)!important; }
html[data-theme="dark"] :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),select,textarea) { background-color:var(--theme-panel)!important; color:var(--theme-text)!important; border-color:var(--theme-line)!important; }
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color:var(--theme-muted); }
html[data-theme="dark"] [class*="text-[#8A642C]"] { color:#dfba78!important; }
/* Fotos, vídeos, tiles, gráficos e capas preservam suas cores. */
html[data-theme="dark"] .leaflet-popup-content-wrapper,html[data-theme="dark"] .leaflet-popup-tip { background:var(--theme-panel); color:var(--theme-text); }
@media print { #leilancer-theme-toggle { display:none!important; } }

/* Superfícies e textos dos componentes existentes. */
html[data-theme="dark"] .breadcrumb{color:var(--theme-text)!important;background-color:var(--theme-panel)!important}
html[data-theme="dark"] .breadcrumb--compact{color:var(--theme-text)!important}
html[data-theme="dark"] .encerrar-leilao-btn{color:var(--theme-text)!important}
html[data-theme="dark"] .encerrar-leilao-btn:hover{color:var(--theme-text)!important}
html[data-theme="dark"] .encerrar-leilao-status{color:var(--theme-text)!important}
html[data-theme="dark"] .lg-gatilho{color:var(--theme-text)!important;background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lg-dialog{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lg-header p,html[data-theme="dark"] .lg-title p{color:var(--theme-text)!important}
html[data-theme="dark"] .lg-dialog button{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lg-dialog a{color:var(--theme-text)!important}
html[data-theme="dark"] .lg-dialog label{color:var(--theme-text)!important}
html[data-theme="dark"] .lg-dialog input,html[data-theme="dark"] .lg-dialog textarea,html[data-theme="dark"] .lg-dialog select{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lg-dialog small{color:var(--theme-text)!important}
html[data-theme="dark"] .lg-badge{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lg-note{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lg-alert{color:var(--theme-text)!important}
html[data-theme="dark"] .lg-footer{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lg-overlay{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .leilao-card{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .titulo{color:var(--theme-text)!important}
html[data-theme="dark"] .endereco{color:var(--theme-text)!important}
html[data-theme="dark"] .avaliacao{color:var(--theme-text)!important}
html[data-theme="dark"] .avaliacao strong{color:var(--theme-text)!important}
html[data-theme="dark"] .favorito-btn:hover{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .icon-favorito{color:var(--theme-text)!important}
html[data-theme="dark"] .leilao-card-lista{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .preco{color:var(--theme-text)!important}
html[data-theme="dark"] .btn-fav{color:var(--theme-text)!important;background-color:var(--theme-panel)!important}
html[data-theme="dark"] .data{color:var(--theme-text)!important;background-color:var(--theme-panel)!important}
html[data-theme="dark"] .btn-trash{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .btn-trash:hover{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-shell{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-sidebar .bg-primary{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-topbar{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-topbar input{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-topbar svg{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-workspace{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-workspace h1{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-workspace [class~="text-white"],html[data-theme="dark"] .lc-workspace [class~="text-white/80"]{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-workspace [class~="text-white/60"],html[data-theme="dark"] .lc-workspace [class~="text-white/70"],html[data-theme="dark"] .lc-workspace [class~="text-white/50"],html[data-theme="dark"] .lc-workspace [class~="text-white/40"]{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-workspace [class~="bg-dark"],html[data-theme="dark"] .lc-workspace [class~="bg-dark-deeper"]{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-workspace .bg-primary,html[data-theme="dark"] .lc-workspace .bg-primary-hover{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-workspace .text-primary{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-primary{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-outline{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-search input{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-view-switch,html[data-theme="dark"] .lc-detail-tabs{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-view-switch button,html[data-theme="dark"] .lc-detail-tabs button{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-view-switch button[aria-pressed=true],html[data-theme="dark"] .lc-detail-tabs button[aria-pressed=true]{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-manager-filters{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-filter-intro span,html[data-theme="dark"] .lc-filter-help{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-filter-range label{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-filter-grid input,html[data-theme="dark"] .lc-filter-grid select{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-active-filters button{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-manager-stats>div{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-manager-stats span{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-selection-list,html[data-theme="dark"] .lc-detail{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-list-caption{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-selection-table th{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-row-active{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-property-row:hover{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .lc-image-placeholder{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-property-ref{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-property small{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-status-note{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-eyebrow{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-preliminary{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-muted{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-detail-values dt{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-estimate-note{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .lc-source-link{color:var(--theme-text)!important}
html[data-theme="dark"] .lc-empty{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .cad-shell{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .cad-form-panel{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .cad-step{color:var(--theme-text)!important}
html[data-theme="dark"] .cad-step b{color:var(--theme-text)!important;background-color:var(--theme-panel)!important}
html[data-theme="dark"] .cad-notice{color:var(--theme-text)!important}
html[data-theme="dark"] .cad-notice-icon{color:var(--theme-text)!important}
html[data-theme="dark"] .cad-field input{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .cad-primary{color:var(--theme-text)!important}
html[data-theme="dark"] .cad-secondary{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .cad-secondary:hover:not(:disabled){background-color:var(--theme-panel)!important}
html[data-theme="dark"] .cad-msg-ok{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .cad-page{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .calculadora-container{color:var(--theme-text)!important}
html[data-theme="dark"] .dropdown-item:hover{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .topo-box{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .bloco h4{color:var(--theme-text)!important}
html[data-theme="dark"] .bloco p{color:var(--theme-text)!important}
html[data-theme="dark"] .detalhamento{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .detalhamento h3{color:var(--theme-text)!important}
html[data-theme="dark"] .detalhamento li{color:var(--theme-text)!important}
html[data-theme="dark"] .favoritos-content-box{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .favoritos-header h1{color:var(--theme-text)!important}
html[data-theme="dark"] .tabela-favoritos th,html[data-theme="dark"] .tabela-favoritos td{color:var(--theme-text)!important}
html[data-theme="dark"] .tabela-favoritos th{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .tabela-favoritos tbody tr{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .tabela-favoritos tbody tr:hover{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .favoritos-vazio{color:var(--theme-text)!important}
html[data-theme="dark"] .tabela-favoritos tbody tr:nth-child(even){background-color:var(--theme-panel)!important}
html[data-theme="dark"] .tabela-favoritos tbody tr:nth-child(odd){background-color:var(--theme-panel)!important}
html[data-theme="dark"] .remover-favorito{color:var(--theme-text)!important}
html[data-theme="dark"] .btn-limpar-filtros{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .contador-resultados{color:var(--theme-text)!important}
html[data-theme="dark"] .leilao-detalhe-container{color:var(--theme-text)!important}
html[data-theme="dark"] .caixa-principal{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .linha-valor h2{color:var(--theme-text)!important}
html[data-theme="dark"] .linha-subinfo .label{color:var(--theme-text)!important}
html[data-theme="dark"] .linha-subinfo .valor{color:var(--theme-text)!important}
html[data-theme="dark"] .legal-section{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .legal-section p{color:var(--theme-text)!important}
html[data-theme="dark"] .linha-informativa .label{color:var(--theme-text)!important}
html[data-theme="dark"] .linha-informativa .valor{color:var(--theme-text)!important}
html[data-theme="dark"] .documentos-links a{color:var(--theme-text)!important}
html[data-theme="dark"] .modal-contato{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .modal-contato p{color:var(--theme-text)!important}
html[data-theme="dark"] .radio-group span,html[data-theme="dark"] .checkbox-group span{color:var(--theme-text)!important}
html[data-theme="dark"] .leiloes-container{color:var(--theme-text)!important}
html[data-theme="dark"] .recent-section h2{color:var(--theme-text)!important}
html[data-theme="dark"] .filtro-popup{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .btn-outline{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .loader{color:var(--theme-text)!important}
html[data-theme="dark"] .paginacao-modernizada button{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .sobre-section{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .sobre-section h2{color:var(--theme-text)!important}
html[data-theme="dark"] .sobre-section p{color:var(--theme-text)!important}
html[data-theme="dark"] .blog-section{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .blog-section h2{color:var(--theme-text)!important}
html[data-theme="dark"] .blog-post{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .blog-post p{color:var(--theme-text)!important}
html[data-theme="dark"] .blog-post a{color:var(--theme-text)!important}
html[data-theme="dark"] .btn.outlined{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .ordenar-dropdown{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .ordenar-item{color:var(--theme-text)!important}
html[data-theme="dark"] .modal-conteudo{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .modal-titulo{color:var(--theme-text)!important}
html[data-theme="dark"] .intro-text{color:var(--theme-text)!important}
html[data-theme="dark"] .intro-text h2{color:var(--theme-text)!important}
html[data-theme="dark"] .intro-text p{color:var(--theme-text)!important}
html[data-theme="dark"] .titulo-secao{color:var(--theme-text)!important}
html[data-theme="dark"] .login-container{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .login-box{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .login-form h2{color:var(--theme-text)!important}
html[data-theme="dark"] .google-btn{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .google-btn:hover{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .separator{color:var(--theme-text)!important}
html[data-theme="dark"] .leilancer-map-toggle{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .leilancer-map-toggle small{color:var(--theme-text)!important}
html[data-theme="dark"] .leilancer-map-legend{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .relatorios-table{background-color:var(--theme-panel)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .sidebar-filtros{background-color:var(--theme-panel)!important}
html[data-theme="dark"] .sidebar-filtros h2{color:var(--theme-text)!important}
html[data-theme="dark"] .filtro-secao label{color:var(--theme-text)!important}
html[data-theme="dark"] :is([style*="color: rgb(37, 43, 40)"],[style*="color: rgb(102, 102, 102)"],[style*="color: rgb(101, 113, 105)"]){color:var(--theme-muted)!important}
