.pw-theme-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;margin:10px 0}.pw-theme-control select{width:auto;min-width:115px;padding:7px 10px;border-radius:8px}.pw-theme-feedback{font-size:11px;max-width:240px}.profile-menu-panel .pw-theme-control{padding:12px 18px;border-top:1px solid #e2e8f0}.platform-user .pw-theme-control{margin:0}
html[data-theme=dark]{--bg:#111827;--surface:#1b2638;--panel:#1b2638;--card:#1b2638;--text:#e5edf7;--muted:#acbad0;--border:#344158;--primary:#39c5bd;--primary-dark:#24a8a0;--accent:#39c5bd;background:#111827;color:#e5edf7;color-scheme:dark}
html[data-theme=dark] body,html[data-theme=dark] .app,html[data-theme=dark] .content,html[data-theme=dark] .platform-content{background:#111827!important;color:#e5edf7!important}
html[data-theme=dark] .panel,html[data-theme=dark] .card,html[data-theme=dark] .top,html[data-theme=dark] .platform-header,html[data-theme=dark] .profile-menu-panel,html[data-theme=dark] .notificacoes-painel,html[data-theme=dark] dialog,html[data-theme=dark] .quick-client-box,html[data-theme=dark] .client-results,html[data-theme=dark] .equipment-results{background:#1b2638!important;color:#e5edf7!important;border-color:#344158!important;box-shadow:0 8px 28px #0003!important}
html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3,html[data-theme=dark] h4,html[data-theme=dark] .num,html[data-theme=dark] .card strong,html[data-theme=dark] .pw-dashboard-grid strong,html[data-theme=dark] .panel-head,html[data-theme=dark] label,html[data-theme=dark] .profile-menu-account strong,html[data-theme=dark] .profile-menu-trigger b{color:#edf4ff!important}
html[data-theme=dark] p,html[data-theme=dark] small,html[data-theme=dark] .muted,html[data-theme=dark] .empty,html[data-theme=dark] .platform-subtitle,html[data-theme=dark] .profile-menu-account span{color:#acbad0}
html[data-theme=dark] a{color:#55d8cc}html[data-theme=dark] a.btn{color:#072b2a!important}html[data-theme=dark] .btn{background:#39c5bd!important;color:#072b2a!important;border-color:#39c5bd!important}html[data-theme=dark] .btn.secondary{background:#24334a!important;color:#e5edf7!important;border-color:#42536e!important}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#121d2e!important;color:#edf4ff!important;border-color:#42536e!important}html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#8e9fb8!important}html[data-theme=dark] input:focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{outline-color:#55d8cc!important}
html[data-theme=dark] table,html[data-theme=dark] td,html[data-theme=dark] th{color:#e5edf7!important;border-color:#344158!important}html[data-theme=dark] th{background:#24334a!important}html[data-theme=dark] tbody tr,html[data-theme=dark] td{background:transparent!important}html[data-theme=dark] tbody tr:hover{background:#24334a!important}
html[data-theme=dark] .sidebar{background:#0c1524!important}html[data-theme=dark] .sidebar a,html[data-theme=dark] .sidebar summary{color:#d1deef!important}html[data-theme=dark] .sidebar a[aria-current=page]{background:#153c41!important;color:#7ee7d9!important}html[data-theme=dark] .sidebar .nav-section-label{color:#8da3bd!important}
html[data-theme=dark] .profile-menu-panel a,html[data-theme=dark] .master-nav a{color:#d1deef!important}html[data-theme=dark] .master-nav{border-color:#344158!important}html[data-theme=dark] .master-nav a[aria-current=page]{background:#153c41!important;color:#7ee7d9!important}
html[data-theme=dark] .calendar-day,html[data-theme=dark] .calendar-weekday,html[data-theme=dark] .calendar-toolbar button,html[data-theme=dark] .calendar-events,html[data-theme=dark] .sale-summary,html[data-theme=dark] fieldset,html[data-theme=dark] .equipment-selected-item,html[data-theme=dark] .client-selected{background:#172236!important;color:#e5edf7!important;border-color:#344158!important}html[data-theme=dark] .calendar-day.muted{background:#121c2d!important;opacity:.7}html[data-theme=dark] .calendar-day.today{box-shadow:inset 0 0 0 2px #39c5bd!important}
html[data-theme=dark] .alert{background:#123c3c!important;color:#b7f0e8!important;border-color:#2e6b67!important}html[data-theme=dark] .alert.err{background:#48252d!important;color:#ffcbd0!important;border-color:#84414b!important}html[data-theme=dark] .badge{background:#263c50;color:#dbeaf9}html[data-theme=dark] .badge.atrasado{background:#48252d;color:#ffcbd0}
html[data-theme=dark] .support-message,html[data-theme=dark] .support-chat-message,html[data-theme=dark] .timeline-body,html[data-theme=dark] .timeline-card,html[data-theme=dark] .equipment-empty,html[data-theme=dark] .client-result,html[data-theme=dark] .equipment-result{background:#172236!important;color:#e5edf7!important;border-color:#344158!important}
html[data-theme=dark] .leaflet-popup-content-wrapper,html[data-theme=dark] .leaflet-popup-tip{background:#1b2638;color:#e5edf7}html[data-theme=dark] dialog::backdrop{background:#0009}html[data-theme=dark] .profile-menu-panel .pw-theme-control{border-color:#344158}
@media print{html[data-theme=dark] body,html[data-theme=dark] .panel,html[data-theme=dark] .card,html[data-theme=dark] table,html[data-theme=dark] th,html[data-theme=dark] td{background:white!important;color:black!important}.pw-theme-control{display:none!important}}
html[data-theme=dark] .notificacoes-popover,html[data-theme=dark] .notificacoes-popover-footer,html[data-theme=dark] .notificacoes-popover-head,html[data-theme=dark] .support-messages{background:#1b2638!important;color:#e5edf7!important;border-color:#344158!important}html[data-theme=dark] .notificacoes-popover-item{color:#e5edf7!important;border-color:#344158!important}html[data-theme=dark] .notificacoes-popover-item.nova,html[data-theme=dark] .support-message.own{background:#153c41!important}html[data-theme=dark] .notificacoes-popover-item:hover{background:#24334a!important}html[data-theme=dark] .notificacoes-popover-item p,html[data-theme=dark] .support-message p,html[data-theme=dark] .support-message-meta strong{color:#c6d4e7!important}html[data-theme=dark] .notificacoes-popover-close{background:#24334a!important;color:#e5edf7!important}
html[data-theme=dark] .timeline-item,html[data-theme=dark] .timeline-content,html[data-theme=dark] .task-card,html[data-theme=dark] .agenda-card{background:#1b2638!important;color:#e5edf7!important;border-color:#344158!important}
@media(max-width:680px){.platform-user .pw-theme-control{width:100%}.equipment-selected-item{flex-wrap:wrap}.equipment-selected-item label{min-width:150px;flex:1}}
html[data-theme=dark] .box,html[data-theme=dark] .master-login,html[data-theme=dark] .auth-shell,html[data-theme=dark] .login{background:#1b2638!important;color:#e5edf7!important;border-color:#344158!important}html[data-theme=dark] .auth-showcase{background:linear-gradient(145deg,#0b2430,#123c3c)!important;color:#f0f7ff!important}html[data-theme=dark] .auth-showcase p,html[data-theme=dark] .auth-showcase li{color:#c1d8e2!important}html[data-theme=dark] pre{background:#121d2e;color:#d9e6f8;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
/* v2: superfícies de tabela explícitas, incluindo regras legadas com fundo branco. */
@media screen{
html[data-theme=dark]{--muted:#c1cee0}
html[data-theme=dark] body table,html[data-theme=dark] body table tbody{background:#1b2638!important;color:#edf4ff!important;border-color:#43516a!important}
html[data-theme=dark] body table tbody tr,html[data-theme=dark] body table tbody td,html[data-theme=dark] body table>tr,html[data-theme=dark] body table>tr>td{background:#1b2638!important;color:#edf4ff!important;border-color:#43516a!important}
html[data-theme=dark] body table tbody tr:nth-child(even),html[data-theme=dark] body table tbody tr:nth-child(even)>td{background:#202d41!important}
html[data-theme=dark] body table tbody tr:hover,html[data-theme=dark] body table tbody tr:hover>td{background:#2b3b53!important}
html[data-theme=dark] body table th{background:#293b54!important;color:#ffffff!important;border-color:#4d607d!important}
html[data-theme=dark] body table td{font-weight:500}
html[data-theme=dark] body table small{color:#c6d4e7!important;font-size:12px;font-weight:400;line-height:1.6}
html[data-theme=dark] body table a{color:#7aeee0!important;font-weight:600}
html[data-theme=dark] body small,html[data-theme=dark] body .muted,html[data-theme=dark] body .empty,html[data-theme=dark] body .master-meta{color:#c1cee0!important}
html[data-theme=dark] body input::placeholder,html[data-theme=dark] body textarea::placeholder{color:#b4c4da!important;opacity:1}
html[data-theme=dark] body .master-body,html[data-theme=dark] body .master-company summary,html[data-theme=dark] body .equip-event,html[data-theme=dark] body .aviso-item,html[data-theme=dark] body .signature-box{background:#1b2638!important;color:#edf4ff!important;border-color:#43516a!important}
html[data-theme=dark] body .master-company summary b,html[data-theme=dark] body .master-kpi b{color:#edf4ff!important}
}

/* v3: mensagens sem registros usam a mesma superfície escura dos painéis. */
@media screen{
html[data-theme=dark] body .empty{
 background:#172236!important;
 color:#d5e1f2!important;
 border:1px solid #344158;
 line-height:1.6;
}
}
