/* RotaFácil theme preference. This stylesheet contains no account or payment credentials. */
html[data-rf-theme="dark"] { color-scheme: dark; }
html[data-rf-theme="dark"] body { background: #0f171a; color: #e7edef; }
html[data-rf-theme="dark"] .top { background: #162024; border-color: #2a383d; color: #e7edef; }
html[data-rf-theme="dark"] .top h1,
html[data-rf-theme="dark"] .heading,
html[data-rf-theme="dark"] .panel h3,
html[data-rf-theme="dark"] .item-main b,
html[data-rf-theme="dark"] .mini strong,
html[data-rf-theme="dark"] .workshop-dashboard h3,
html[data-rf-theme="dark"] .current-trip-head strong { color: #e7edef; }
html[data-rf-theme="dark"] .top .tiny,
html[data-rf-theme="dark"] .eyebrow,
html[data-rf-theme="dark"] .panel p.sub,
html[data-rf-theme="dark"] .stat .label,
html[data-rf-theme="dark"] .mini small,
html[data-rf-theme="dark"] .item-main small,
html[data-rf-theme="dark"] .field label,
html[data-rf-theme="dark"] .footnote,
html[data-rf-theme="dark"] .report-stat small,
html[data-rf-theme="dark"] .workshop-metric small,
html[data-rf-theme="dark"] .driver-details,
html[data-rf-theme="dark"] .driver-line small { color: #a9bbb4; }
html[data-rf-theme="dark"] .panel,
html[data-rf-theme="dark"] .stat:not(.primary),
html[data-rf-theme="dark"] .mini,
html[data-rf-theme="dark"] .sample,
html[data-rf-theme="dark"] .plan-card,
html[data-rf-theme="dark"] .report-stat,
html[data-rf-theme="dark"] .fleet-chart-card,
html[data-rf-theme="dark"] .workshop-dashboard,
html[data-rf-theme="dark"] .workshop-metric,
html[data-rf-theme="dark"] .home-quick button,
html[data-rf-theme="dark"] .home-alerts,
html[data-rf-theme="dark"] .upload,
html[data-rf-theme="dark"] .current-trip,
html[data-rf-theme="dark"] .fleet-winner,
html[data-rf-theme="dark"] .fleet-winner.low,
html[data-rf-theme="dark"] .tire-v2 .tire-kpis>div,
html[data-rf-theme="dark"] .fleet-bar-track,
html[data-rf-theme="dark"] .report-chip,
html[data-rf-theme="dark"] .payment-plan,
html[data-rf-theme="dark"] .auth-card,
html[data-rf-theme="dark"] .auth-layout,
html[data-rf-theme="dark"] .login-card,
html[data-rf-theme="dark"] .rf-public-document article { background: #162024; color: #e7edef; border-color: #2a383d; }
html[data-rf-theme="dark"] .stat.positive,
html[data-rf-theme="dark"] .current-trip,
html[data-rf-theme="dark"] .fleet-winner { background: #1f2f34; }
html[data-rf-theme="dark"] .field input,
html[data-rf-theme="dark"] .field select,
html[data-rf-theme="dark"] .field textarea,
html[data-rf-theme="dark"] input,
html[data-rf-theme="dark"] select,
html[data-rf-theme="dark"] textarea,
html[data-rf-theme="dark"] #fleet-dialog textarea { background: #10191c; color: #e7edef; border-color: #384b52; }
html[data-rf-theme="dark"] input::placeholder,
html[data-rf-theme="dark"] textarea::placeholder { color: #899d95; }
html[data-rf-theme="dark"] .empty,
html[data-rf-theme="dark"] .empty b { color: #b7c7c0; }
html[data-rf-theme="dark"] .items>.item,
html[data-rf-theme="dark"] .item,
html[data-rf-theme="dark"] .trip-record,
html[data-rf-theme="dark"] .summaryline,
html[data-rf-theme="dark"] .workshop-history { border-color: #2a383d; }
html[data-rf-theme="dark"] .item-icon,
html[data-rf-theme="dark"] .pill,
html[data-rf-theme="dark"] .pill.green,
html[data-rf-theme="dark"] .pill.amber,
html[data-rf-theme="dark"] .pill.red,
html[data-rf-theme="dark"] .info,
html[data-rf-theme="dark"] .fleet-tip,
html[data-rf-theme="dark"] .home-alerts button,
html[data-rf-theme="dark"] .workshop-actions button,
html[data-rf-theme="dark"] .trip-status-actions button { background: #212f34; color: #c5d8cf; border-color: #384b52; }
html[data-rf-theme="dark"] .info.warn,
html[data-rf-theme="dark"] .driver-note,
html[data-rf-theme="dark"] .driver-commission,
html[data-rf-theme="dark"] .workshop-alert,
html[data-rf-theme="dark"] .workshop-alert.soon { background: #332b1d; color: #eed49a; border-color: #625233; }
html[data-rf-theme="dark"] .workshop-alert.late { background: #352321; border-color: #62403b; }
html[data-rf-theme="dark"] .mobile-nav { background: #162024; border-color: #2a383d; }
html[data-rf-theme="dark"] .mobile-nav button { color: #a9bbb4; }
html[data-rf-theme="dark"] .mobile-nav button.active { color: #d6ed9a; }
html[data-rf-theme="dark"] .mobile-nav button.active span { background: #293c42; }
html[data-rf-theme="dark"] .account-controls button,
html[data-rf-theme="dark"] .button.outline { background: #212f34; color: #e7edef; border-color: #384b52; }
html[data-rf-theme="dark"] .rf-public-footer,
html[data-rf-theme="dark"] .rf-public-document { background: #0f171a; color: #d5dfe2; border-color: #2a383d; }
html[data-rf-theme="dark"] .rf-public-footer strong,
html[data-rf-theme="dark"] .rf-public-brand,
html[data-rf-theme="dark"] .rf-public-document h1,
html[data-rf-theme="dark"] .rf-public-document h2 { color: #e7edef; }
html[data-rf-theme="dark"] .rf-public-footer a,
html[data-rf-theme="dark"] .rf-public-document a { color: #a9d36a; }
html[data-rf-theme="dark"] .auth-screen { background: #0f171a; }
html[data-rf-theme="dark"] .auth-card h2,
html[data-rf-theme="dark"] .login-card h1,
html[data-rf-theme="dark"] .auth-mobile-brand { color: #e7edef; }
html[data-rf-theme="dark"] .auth-card h2+p,
html[data-rf-theme="dark"] .login-card p,
html[data-rf-theme="dark"] .auth-card .field label { color: #a9bbb4; }
html[data-rf-theme="dark"] .auth-card .field input,
html[data-rf-theme="dark"] .payment-email,
html[data-rf-theme="dark"] .payment-state,
html[data-rf-theme="dark"] .auth-secondary { background: #10191c; color: #e7edef; border-color: #384b52; }
html[data-rf-theme="dark"] .auth-tabs { border-color: #2a383d; }
html[data-rf-theme="dark"] .auth-tabs button { color: #a9bbb4; }
html[data-rf-theme="dark"] .auth-tabs button[aria-selected=true] { color: #d7efa1; }
html[data-rf-theme="dark"] .auth-security,
html[data-rf-theme="dark"] .auth-note { color: #a9bbb4; border-color: #2a383d; }
html[data-rf-theme="dark"] .auth-password button { color: #a9d36a; }
.rf-theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #d4dddf; border-radius: 999px; background: #fff; color: #173e33; padding: 9px 12px; font: 700 12px/1.2 Arial,sans-serif; white-space: nowrap; cursor: pointer; }
.rf-theme-toggle:hover { filter: brightness(.97); }
.rf-theme-toggle:focus-visible { outline: 3px solid #84ad45; outline-offset: 3px; }
.login-screen.auth-screen { position: relative; }
.rf-theme-toggle-login { position: absolute; z-index: 5; top: 16px; right: 18px; }
.rf-theme-toggle-global { position: fixed; z-index: 1000; top: 16px; right: 16px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.top-actions .account-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
html[data-rf-theme="dark"] .rf-theme-toggle { background: #212f34; color: #e7edef; border-color: #384b52; }
@media(max-width:720px) {
  .rf-theme-toggle-login { top: 10px; right: 10px; }
  .top-actions { gap: 6px; max-width: 78%; }
  .top-actions .rf-theme-toggle { padding: 8px 9px; font-size: 11px; }
  .top-actions .account-controls { max-width: 190px; }
  .top-actions .account-controls span { width: 100%; text-align: right; }
}

/* Palavra na Estrada: garante contraste legível nos dois temas. */
.word-card{background:#fff!important;color:#173e33!important;border:1px solid #b8d3bf!important;opacity:1!important}
.word-card .word-head strong,.word-card h3,.word-card p,.word-card .word-ref,.word-card .word-preferences,.word-card .word-hint{color:#173e33!important;opacity:1!important}
.word-card .word-ref{color:#2e5967!important}.word-card .word-hint{color:#496068!important}
.word-card .word-head button,.word-card .word-actions button:not(:first-child){background:#fff!important;color:#20424e!important;border-color:#b8d3bf!important}
html[data-rf-theme="dark"] .word-card{background:#162024!important;color:#e7edef!important;border-color:#455b62!important}
html[data-rf-theme="dark"] .word-card .word-head strong,html[data-rf-theme="dark"] .word-card h3,html[data-rf-theme="dark"] .word-card p,html[data-rf-theme="dark"] .word-card .word-ref,html[data-rf-theme="dark"] .word-card .word-preferences,html[data-rf-theme="dark"] .word-card .word-hint{color:#e7edef!important}
html[data-rf-theme="dark"] .word-card .word-ref{color:#c5e7a1!important}html[data-rf-theme="dark"] .word-card .word-hint{color:#b8cbc1!important}
html[data-rf-theme="dark"] .word-card .word-head button,html[data-rf-theme="dark"] .word-card .word-actions button:not(:first-child){background:#212f34!important;color:#e7edef!important;border-color:#455b62!important}

/* Contraste consistente nos módulos com fundos coloridos e componentes dinâmicos. */
html[data-rf-theme="dark"] .calc-options,
html[data-rf-theme="dark"] .radio-tabs label,
html[data-rf-theme="dark"] .plan-card,
html[data-rf-theme="dark"] .report-chip,
html[data-rf-theme="dark"] .report-stat,
html[data-rf-theme="dark"] .fleet-winner,
html[data-rf-theme="dark"] .fleet-chart-card,
html[data-rf-theme="dark"] .trip-status-actions button,
html[data-rf-theme="dark"] .driver-upload,
html[data-rf-theme="dark"] .trip-summary-line,
html[data-rf-theme="dark"] .more-overlay,
html[data-rf-theme="dark"] .more-links button,
html[data-rf-theme="dark"] .expiry-dashboard,
html[data-rf-theme="dark"] .tire-v2 .tire-kpis>div,
html[data-rf-theme="dark"] .tire-v2 .tire-history,
html[data-rf-theme="dark"] .rig-unit,
html[data-rf-theme="dark"] .rig-fogo,
html[data-rf-theme="dark"] .rig-actions button,
html[data-rf-theme="dark"] .vehicle-tab,
html[data-rf-theme="dark"] .integrated-trip-card,
html[data-rf-theme="dark"] .integrated-tabs button,
html[data-rf-theme="dark"] .segmented-tabs button,
html[data-rf-theme="dark"] .category-chip,
html[data-rf-theme="dark"] .edit-record-panel,
html[data-rf-theme="dark"] .whatsapp-card,
html[data-rf-theme="dark"] .home-quick button,
html[data-rf-theme="dark"] .home-alerts,
html[data-rf-theme="dark"] .payment-plan,
html[data-rf-theme="dark"] .pix-panel,
html[data-rf-theme="dark"] .auth-secondary,
html[data-rf-theme="dark"] .payment-test,
html[data-rf-theme="dark"] .orders-test-banner,
html[data-rf-theme="dark"] .report-reliability,
html[data-rf-theme="dark"] .settle-alert,
html[data-rf-theme="dark"] .km-alert,
html[data-rf-theme="dark"] .tire-correction-note,
html[data-rf-theme="dark"] .vehicle-axle-total,
html[data-rf-theme="dark"] .vehicle-edit-primary,
html[data-rf-theme="dark"] .edit-record-button {
  background:#162024!important;
  color:#e7edef!important;
  border-color:#384b52!important;
}
html[data-rf-theme="dark"] .stat.positive,
html[data-rf-theme="dark"] .fleet-winner,
html[data-rf-theme="dark"] .current-trip,
html[data-rf-theme="dark"] .driver-commission,
html[data-rf-theme="dark"] .tire-v2 .tire-slot.occupied,
html[data-rf-theme="dark"] .rig-tire,
html[data-rf-theme="dark"] .vehicle-axle-row label:has(input:checked) {
  background:#1f2f34!important;color:#d8edca!important;border-color:#455b62!important;
}
html[data-rf-theme="dark"] .stat.positive .value,
html[data-rf-theme="dark"] .stat.positive .label,
html[data-rf-theme="dark"] .current-trip * ,
html[data-rf-theme="dark"] .integrated-trip-card *,
html[data-rf-theme="dark"] .rig-unit *,
html[data-rf-theme="dark"] .report-chip,
html[data-rf-theme="dark"] .report-stat *,
html[data-rf-theme="dark"] .fleet-winner * {color:#e7edef!important}
html[data-rf-theme="dark"] .fleet-winner.low,
html[data-rf-theme="dark"] .workshop-alert.late,
html[data-rf-theme="dark"] .expiry-item.expired,
html[data-rf-theme="dark"] .expiry-tag.expired,
html[data-rf-theme="dark"] .km-alert.error {background:#352321!important;color:#ffd4cd!important;border-color:#70443e!important}
html[data-rf-theme="dark"] .driver-note,
html[data-rf-theme="dark"] .workshop-alert.soon,
html[data-rf-theme="dark"] .expiry-item.soon,
html[data-rf-theme="dark"] .expiry-tag.soon,
html[data-rf-theme="dark"] .report-reliability,
html[data-rf-theme="dark"] .settle-alert,
html[data-rf-theme="dark"] .km-alert.warning,
html[data-rf-theme="dark"] .tire-correction-note,
html[data-rf-theme="dark"] .payment-test,
html[data-rf-theme="dark"] .orders-test-banner {background:#332b1d!important;color:#f2d99f!important;border-color:#625233!important}
html[data-rf-theme="dark"] .driver-commission,
html[data-rf-theme="dark"] .km-alert.ok,
html[data-rf-theme="dark"] .finance-v16-warnings .ok {background:#1e353d!important;color:#d1f0ce!important;border-color:#415c65!important}
html[data-rf-theme="dark"] .tire-v2 .tire-slot.empty,
html[data-rf-theme="dark"] .rig-tire.free,
html[data-rf-theme="dark"] .expiry-tag,
html[data-rf-theme="dark"] .report-chip:not(.selected),
html[data-rf-theme="dark"] .more-links button,
html[data-rf-theme="dark"] .category-chip {color:#d1dfe2!important}
html[data-rf-theme="dark"] #c-monthly-panel,
html[data-rf-theme="dark"] .panel[style*="background:#eaf5d0"],
html[data-rf-theme="dark"] .whatsapp-preview {background:#162024!important;color:#e7edef!important;border-color:#384b52!important}
html[data-rf-theme="dark"] .review-table td:first-child,
html[data-rf-theme="dark"] .field-tip,
html[data-rf-theme="dark"] .km-odometer-tip,
html[data-rf-theme="dark"] .driver-details,
html[data-rf-theme="dark"] .driver-line small,
html[data-rf-theme="dark"] .expiry-title,
html[data-rf-theme="dark"] .current-trip-meta,
html[data-rf-theme="dark"] .finance-v16-label {color:#b7c7c0!important}
html[data-rf-theme="dark"] .auth-link,
html[data-rf-theme="dark"] .auth-secondary,
html[data-rf-theme="dark"] .payment-email,
html[data-rf-theme="dark"] .payment-state {color:#d4e2e5!important}
html[data-rf-theme="dark"] .payment-state,
html[data-rf-theme="dark"] .payment-plan:has(input:checked) {background:#332b1d!important;color:#f2d99f!important;border-color:#625233!important}
html[data-rf-theme="dark"] .pix-panel textarea,
html[data-rf-theme="dark"] .pix-panel input,
html[data-rf-theme="dark"] .vehicle-upload input {background:#10191c!important;color:#e7edef!important;border-color:#384b52!important}
html[data-rf-theme="dark"] input:disabled,
html[data-rf-theme="dark"] select:disabled,
html[data-rf-theme="dark"] textarea:disabled {background:#192428!important;color:#a9bbb4!important;opacity:1}
html[data-rf-theme="dark"] .button:not(.outline),
html[data-rf-theme="dark"] .nav.active {color:#102d35!important}
html[data-rf-theme="dark"] .report-chip.selected,
html[data-rf-theme="dark"] .vehicle-tab.active {color:#a9d36a!important}
html[data-rf-theme="dark"] .button.dark {color:#fff!important}
html[data-rf-theme="dark"] :focus-visible {outline:3px solid #a9d36a!important;outline-offset:2px}
html[data-rf-theme="dark"] .trip-history-section {background:#162024!important;border-color:#384b52!important;color:#e7edef!important}
html[data-rf-theme="dark"] .trip-history-section>summary {color:#d7e5e9!important}
html[data-rf-theme="dark"] .integrated-trip-card {background:#162024!important;border-color:#384b52!important;color:#e7edef!important}
html[data-rf-theme="dark"] .integrated-card-head small,
html[data-rf-theme="dark"] .integrated-trip-card .summaryline {color:#d1dfe2!important}
html[data-rf-theme="dark"] .integrated-cashflow {background:#1e353d!important;color:#e7edef!important}
html[data-rf-theme="dark"] .integrated-cashflow>b {color:#d1f0ce!important}
html[data-rf-theme="dark"] .integrated-actions button {background:#1e353d!important;border-color:#415c65!important;color:#d1f0ce!important}
