/* ============================================================
   UniRise – Global Theme (Light / Dark)
   Controlado por: body[data-theme="dark"] / body[data-theme="light"]
   ============================================================ */

/* ── Variáveis globais — Light (padrão) ─────────────────────── */
body {
    --theme-bg:           #f4f6f9;
    --theme-bg2:          #ffffff;
    --theme-bg3:          #f0f2f5;
    --theme-card:         #ffffff;
    --theme-card-border:  #e9ecef;
    --theme-card-shadow:  0 1px 6px rgba(0,0,0,.07);
    --theme-navbar:       #ffffff;
    --theme-navbar-border:#e9ecef;
    --theme-text:         #343a40;
    --theme-text-muted:   #6c757d;
    --theme-text-light:   #adb5bd;
    --theme-input-bg:     #ffffff;
    --theme-input-border: #ced4da;
    --theme-input-text:   #495057;
    --theme-table-head:   #f8f9fa;
    --theme-table-border: #dee2e6;
    --theme-table-stripe: #f8f9fa;
    --theme-dropdown:     #ffffff;
    --theme-dropdown-border: #dee2e6;
    --theme-modal:        #ffffff;
    --theme-header-text:  #343a40;
    --theme-section-line: #dee2e6;
    --theme-shortcut-bg:  #ffffff;
    --theme-shortcut-border: #e9ecef;
    --theme-shortcut-text:#343a40;
    --theme-search-bg:    #ffffff;
    --theme-search-border:#dee2e6;
    --theme-transition:   0.2s ease;
}

/* ── Variáveis globais — Dark ───────────────────────────────── */
body[data-theme="dark"],
html[data-theme="dark"] body {
    --theme-bg:           #0f1117;
    --theme-bg2:          #16161e;
    --theme-bg3:          #1a1a24;
    --theme-card:         #1e1e2a;
    --theme-card-border:  rgba(255,255,255,0.07);
    --theme-card-shadow:  0 2px 12px rgba(0,0,0,.35);
    --theme-navbar:       #16161e;
    --theme-navbar-border:rgba(255,255,255,0.07);
    --theme-text:         #e2e2ec;
    --theme-text-muted:   #8888a8;
    --theme-text-light:   #555570;
    --theme-input-bg:     #1e1e2a;
    --theme-input-border: rgba(255,255,255,0.12);
    --theme-input-text:   #e2e2ec;
    --theme-table-head:   #1a1a24;
    --theme-table-border: rgba(255,255,255,0.08);
    --theme-table-stripe: #1a1a24;
    --theme-dropdown:     #1e1e2a;
    --theme-dropdown-border: rgba(255,255,255,0.1);
    --theme-modal:        #1e1e2a;
    --theme-header-text:  #e2e2ec;
    --theme-section-line: rgba(255,255,255,0.08);
    --theme-shortcut-bg:  #1e1e2a;
    --theme-shortcut-border: rgba(255,255,255,0.08);
    --theme-shortcut-text:#e2e2ec;
    --theme-search-bg:    #1e1e2a;
    --theme-search-border:rgba(255,255,255,0.12);
    --theme-transition:   0.2s ease;
}

/* ── Transições suaves ──────────────────────────────────────── */
body,
.content-wrapper,
.main-header,
.card,
.card-header,
.card-body,
.card-footer,
.form-control,
.input-group-text,
.table,
.dropdown-menu,
.modal-content,
.nav-tabs .nav-link,
.list-group-item {
    transition:
        background-color var(--theme-transition),
        border-color var(--theme-transition),
        color var(--theme-transition),
        box-shadow var(--theme-transition) !important;
}

/* ── Body ───────────────────────────────────────────────────── */
body {
    background-color: var(--theme-bg) !important;
    color: var(--theme-text) !important;
}

/* ── Navbar (top bar) ───────────────────────────────────────── */
nav.main-header {
    background-color: var(--theme-navbar) !important;
    border-bottom: 1px solid var(--theme-navbar-border) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}

body[data-theme="dark"] nav.main-header {
    box-shadow: 0 1px 8px rgba(0,0,0,.3) !important;
}

nav.main-header .nav-link,
nav.main-header .navbar-nav .nav-link {
    color: var(--theme-text-muted) !important;
}

nav.main-header .nav-link:hover {
    color: var(--theme-text) !important;
}

/* ── Content Wrapper ────────────────────────────────────────── */
.content-wrapper {
    background-color: var(--theme-bg) !important;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background-color: var(--theme-card) !important;
    border: 1px solid var(--theme-card-border) !important;
    box-shadow: var(--theme-card-shadow) !important;
    color: var(--theme-text) !important;
}

.card-header {
    background-color: var(--theme-card) !important;
    border-bottom: 1px solid var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

.card-body,
.card-footer {
    background-color: var(--theme-card) !important;
    color: var(--theme-text) !important;
}

.card-footer {
    border-top: 1px solid var(--theme-card-border) !important;
}

/* Card com border-left colorida: preservar */
.card[class*="border-left-"] .card-header,
.card[class*="border-left-"] .card-body {
    background-color: var(--theme-card) !important;
}

/* ── Formulários ────────────────────────────────────────────── */
.form-control,
.custom-select,
.input-group-text {
    background-color: var(--theme-input-bg) !important;
    border-color: var(--theme-input-border) !important;
    color: var(--theme-input-text) !important;
}

.form-control:focus,
.custom-select:focus {
    background-color: var(--theme-input-bg) !important;
    color: var(--theme-input-text) !important;
    border-color: #826eff !important;
    box-shadow: 0 0 0 0.2rem rgba(130,110,255,.2) !important;
}

.form-control::placeholder {
    color: var(--theme-text-muted) !important;
    opacity: 1;
}

label,
.col-form-label {
    color: var(--theme-text) !important;
}

/* ── Tabelas ────────────────────────────────────────────────── */
.table {
    color: var(--theme-text) !important;
}

.table thead th {
    background-color: var(--theme-table-head) !important;
    border-color: var(--theme-table-border) !important;
    color: var(--theme-text-muted) !important;
}

.table td,
.table th {
    border-color: var(--theme-table-border) !important;
    color: var(--theme-text) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--theme-table-stripe) !important;
}

.table-hover tbody tr:hover {
    background-color: var(--theme-table-stripe) !important;
}

/* DataTables */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: var(--theme-input-bg) !important;
    border-color: var(--theme-input-border) !important;
    color: var(--theme-input-text) !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--theme-text-muted) !important;
}

/* ── Dropdowns ──────────────────────────────────────────────── */
.dropdown-menu {
    background-color: var(--theme-dropdown) !important;
    border-color: var(--theme-dropdown-border) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
}

.dropdown-item {
    color: var(--theme-text) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--theme-bg3) !important;
    color: var(--theme-text) !important;
}

.dropdown-divider {
    border-color: var(--theme-card-border) !important;
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-content {
    background-color: var(--theme-modal) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

.modal-header,
.modal-footer {
    border-color: var(--theme-card-border) !important;
}

.modal-title {
    color: var(--theme-text) !important;
}

/* ── List groups ────────────────────────────────────────────── */
.list-group-item {
    background-color: var(--theme-card) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

/* ── Nav tabs ───────────────────────────────────────────────── */
.nav-tabs {
    border-color: var(--theme-card-border) !important;
}

.nav-tabs .nav-link {
    color: var(--theme-text-muted) !important;
}

.nav-tabs .nav-link.active {
    background-color: var(--theme-card) !important;
    border-color: var(--theme-card-border) var(--theme-card-border) var(--theme-card) !important;
    color: var(--theme-text) !important;
}

/* ── Badges / Pills ─────────────────────────────────────────── */
body[data-theme="dark"] .badge-light {
    background-color: rgba(255,255,255,0.12) !important;
    color: var(--theme-text) !important;
}

/* ── Alerts ─────────────────────────────────────────────────── */
body[data-theme="dark"] .alert {
    border-color: var(--theme-card-border) !important;
}

/* ── Headings e textos ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--theme-text) !important;
}

.text-muted {
    color: var(--theme-text-muted) !important;
}

small {
    color: var(--theme-text-muted) !important;
}

/* ── Content header ─────────────────────────────────────────── */
.content-header h1 {
    color: var(--theme-text) !important;
}

.breadcrumb {
    background-color: transparent !important;
}

.breadcrumb-item a {
    color: var(--theme-text-muted) !important;
}

.breadcrumb-item.active {
    color: var(--theme-text-muted) !important;
}

/* ── Welcome page: shortcut cards ──────────────────────────── */
body[data-theme="dark"] .shortcut-card {
    background-color: var(--theme-shortcut-bg) !important;
    border-color: var(--theme-shortcut-border) !important;
    color: var(--theme-shortcut-text) !important;
}

body[data-theme="dark"] .shortcut-card:hover {
    border-color: rgba(130,110,255,.35) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.35) !important;
    color: var(--theme-shortcut-text) !important;
}

body[data-theme="dark"] .shortcut-card .card-label {
    color: var(--theme-shortcut-text) !important;
}

/* ── Welcome page: section title ────────────────────────────── */
body[data-theme="dark"] .section-title {
    color: var(--theme-text-muted) !important;
}

body[data-theme="dark"] .section-title::after {
    background: var(--theme-section-line) !important;
}

/* ── Welcome page: search ───────────────────────────────────── */
body[data-theme="dark"] #shortcut-search {
    background: var(--theme-search-bg) !important;
    border-color: var(--theme-search-border) !important;
    color: var(--theme-input-text) !important;
}

/* ── Welcome page: body bg ──────────────────────────────────── */
body[data-theme="dark"] {
    background-color: var(--theme-bg) !important;
}

/* ── Select2 ────────────────────────────────────────────────── */
body[data-theme="dark"] .select2-container--default .select2-selection--single,
body[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: var(--theme-input-bg) !important;
    border-color: var(--theme-input-border) !important;
}

body[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--theme-input-text) !important;
}

body[data-theme="dark"] .select2-dropdown {
    background-color: var(--theme-dropdown) !important;
    border-color: var(--theme-dropdown-border) !important;
}

body[data-theme="dark"] .select2-container--default .select2-results__option {
    color: var(--theme-text) !important;
    background-color: var(--theme-dropdown) !important;
}

body[data-theme="dark"] .select2-container--default .select2-results__option--highlighted {
    background-color: rgba(130,110,255,.2) !important;
    color: var(--theme-text) !important;
}

/* ── SweetAlert2 ────────────────────────────────────────────── */
body[data-theme="dark"] .swal2-popup {
    background-color: var(--theme-modal) !important;
    color: var(--theme-text) !important;
}

/* ── AdminLTE info-box / small-box ──────────────────────────── */
body[data-theme="dark"] .info-box {
    background-color: var(--theme-card) !important;
    box-shadow: var(--theme-card-shadow) !important;
}

body[data-theme="dark"] .info-box-text {
    color: var(--theme-text-muted) !important;
}

body[data-theme="dark"] .info-box-number {
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .small-box {
    background-color: var(--theme-card) !important;
    box-shadow: var(--theme-card-shadow) !important;
}

body[data-theme="dark"] .small-box h3,
body[data-theme="dark"] .small-box p {
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .small-box .icon {
    color: rgba(255,255,255,0.15) !important;
}

body[data-theme="dark"] .small-box-footer {
    background-color: rgba(0,0,0,0.2) !important;
    color: var(--theme-text-muted) !important;
}

/* ── Shopee items — card-flat + variation table (inline styles) ── */
body[data-theme="dark"] .card.card-flat {
    background: var(--theme-card) !important;
}

body[data-theme="dark"] .card.card-flat table {
    background: var(--theme-bg3) !important;
}

body[data-theme="dark"] .card.card-flat table tbody tr {
    background: transparent !important;
}

body[data-theme="dark"] .card.card-flat table tbody tr:nth-of-type(odd) {
    background: rgba(255,255,255,0.03) !important;
}

body[data-theme="dark"] .card.card-flat table td,
body[data-theme="dark"] .card.card-flat table th {
    color: var(--theme-text) !important;
    border-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] .card.card-flat .thead-light th {
    background: var(--theme-table-head) !important;
    color: var(--theme-text-muted) !important;
}

/* ── Mercado ADS dashboard ───────────────────────────────────── */
body[data-theme="dark"] .ads-kpi {
    background: var(--theme-card) !important;
    box-shadow: var(--theme-card-shadow) !important;
}
body[data-theme="dark"] .ads-kpi .kpi-label {
    color: var(--theme-text-muted) !important;
}
body[data-theme="dark"] .ads-kpi .kpi-value {
    color: var(--theme-text) !important;
}
body[data-theme="dark"] .ads-kpi .kpi-delta .neutral {
    color: var(--theme-text-muted) !important;
}

body[data-theme="dark"] .ads-card {
    background: var(--theme-card) !important;
    box-shadow: var(--theme-card-shadow) !important;
}
body[data-theme="dark"] .ads-card .ads-card-header {
    background: var(--theme-card) !important;
    border-bottom-color: var(--theme-card-border) !important;
}
body[data-theme="dark"] .ads-card .ads-card-header .title {
    color: var(--theme-text-muted) !important;
}

body[data-theme="dark"] .ads-filter-bar {
    background: var(--theme-card) !important;
    box-shadow: var(--theme-card-shadow) !important;
}

body[data-theme="dark"] .ads-table thead th {
    background: var(--theme-table-head) !important;
    color: var(--theme-text-muted) !important;
    border-bottom-color: var(--theme-card-border) !important;
}
body[data-theme="dark"] .ads-table tbody td {
    border-top-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}
body[data-theme="dark"] .ads-table tbody tr:hover {
    background: rgba(255,255,255,0.03) !important;
}

body[data-theme="dark"] .ads-alert-banner {
    background: linear-gradient(135deg, rgba(146,64,14,0.18) 0%, rgba(146,64,14,0.28) 100%) !important;
    border-color: rgba(253,230,138,0.25) !important;
}

body[data-theme="dark"] .spend-bar-wrap {
    background: rgba(255,255,255,0.08) !important;
}

body[data-theme="dark"] .badge-product {
    background: rgba(44,90,233,0.22) !important;
    color: #7eaaff !important;
}
body[data-theme="dark"] .badge-brand {
    background: rgba(26,188,156,0.2) !important;
    color: #4dd5b8 !important;
}
body[data-theme="dark"] .badge-display {
    background: rgba(155,89,182,0.22) !important;
    color: #c39be4 !important;
}
body[data-theme="dark"] .badge-active {
    background: rgba(39,174,96,0.2) !important;
    color: #6ee09b !important;
}
body[data-theme="dark"] .badge-paused {
    background: rgba(243,156,18,0.2) !important;
    color: #f5c55b !important;
}

body[data-theme="dark"] .ads-modal-tabs .nav-link {
    color: var(--theme-text-muted) !important;
}
body[data-theme="dark"] .sync-progress-label {
    color: var(--theme-text-muted) !important;
}

/* ============================================================
   Dark mode: DateRangePicker
   ============================================================ */
body[data-theme="dark"] .daterangepicker {
    background-color: var(--theme-modal) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,.45) !important;
}

body[data-theme="dark"] .daterangepicker::before {
    border-bottom-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] .daterangepicker::after {
    border-bottom-color: var(--theme-modal) !important;
}

body[data-theme="dark"] .daterangepicker .calendar-table {
    background-color: var(--theme-modal) !important;
    border-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] .daterangepicker .calendar-table th,
body[data-theme="dark"] .daterangepicker .calendar-table td {
    color: var(--theme-text) !important;
    background-color: transparent !important;
}

body[data-theme="dark"] .daterangepicker .calendar-table th {
    color: var(--theme-text-muted) !important;
}

body[data-theme="dark"] .daterangepicker td.off,
body[data-theme="dark"] .daterangepicker td.off.in-range,
body[data-theme="dark"] .daterangepicker td.off.start-date,
body[data-theme="dark"] .daterangepicker td.off.end-date {
    background-color: transparent !important;
    color: var(--theme-text-light) !important;
}

body[data-theme="dark"] .daterangepicker td.available:hover,
body[data-theme="dark"] .daterangepicker th.available:hover {
    background-color: rgba(130,110,255,.25) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .daterangepicker td.in-range {
    background-color: rgba(130,110,255,.15) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .daterangepicker td.active,
body[data-theme="dark"] .daterangepicker td.active:hover {
    background-color: #826eff !important;
    color: #fff !important;
    border-radius: 4px;
}

body[data-theme="dark"] .daterangepicker td.today {
    font-weight: 700;
    color: #a78bfa !important;
}

body[data-theme="dark"] .daterangepicker .drp-buttons {
    border-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] .daterangepicker .cancelBtn {
    background-color: var(--theme-bg3) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .daterangepicker .applyBtn {
    background-color: #826eff !important;
    border-color: #826eff !important;
    color: #fff !important;
}

body[data-theme="dark"] .daterangepicker select.monthselect,
body[data-theme="dark"] .daterangepicker select.yearselect {
    background-color: var(--theme-bg3) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .daterangepicker .drp-selected {
    color: var(--theme-text-muted) !important;
}

/* ============================================================
   Dark mode: FullCalendar v3
   ============================================================ */
body[data-theme="dark"] .fc-unthemed th,
body[data-theme="dark"] .fc-unthemed td,
body[data-theme="dark"] .fc-unthemed thead,
body[data-theme="dark"] .fc-unthemed tbody,
body[data-theme="dark"] .fc-unthemed .fc-divider,
body[data-theme="dark"] .fc-unthemed .fc-row,
body[data-theme="dark"] .fc-unthemed .fc-content,
body[data-theme="dark"] .fc-unthemed .fc-popover {
    border-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] .fc-unthemed .fc-widget-header {
    background: var(--theme-table-head) !important;
    color: var(--theme-text-muted) !important;
}

body[data-theme="dark"] .fc-unthemed .fc-widget-content {
    background: var(--theme-card) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .fc-unthemed td.fc-today {
    background: rgba(130, 110, 255, 0.12) !important;
}

body[data-theme="dark"] .fc-unthemed .fc-other-month {
    background: var(--theme-bg) !important;
    opacity: 0.7;
}

body[data-theme="dark"] .fc-unthemed .fc-day-number,
body[data-theme="dark"] .fc-unthemed .fc-day-header {
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .fc-toolbar .fc-button {
    background: var(--theme-bg3) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .fc-toolbar .fc-button:hover,
body[data-theme="dark"] .fc-toolbar .fc-button.fc-state-active {
    background: #826eff !important;
    border-color: #826eff !important;
    color: #fff !important;
}

body[data-theme="dark"] .fc-toolbar h2 {
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .fc-event {
    border-color: transparent !important;
}

/* Evento "Total" cinza */
body[data-theme="dark"] .fc-event[style*="background-color: rgb(204, 204, 204)"],
body[data-theme="dark"] .fc-event[style*="background-color:#cccccc"] {
    background-color: rgba(255,255,255,0.1) !important;
    color: var(--theme-text) !important;
}

/* ── Bootstrap utility overrides (dark mode) ────────────────── */
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-light {
    background-color: var(--theme-card) !important;
    color: var(--theme-text) !important;
}

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

body[data-theme="dark"] .border,
body[data-theme="dark"] .border-bottom,
body[data-theme="dark"] .border-top {
    border-color: var(--theme-card-border) !important;
}

/* ── Filter container (telas de listagem) ───────────────────── */
.filter-container {
    background-color: var(--theme-card) !important;
    border: 1px solid var(--theme-card-border) !important;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: background-color var(--theme-transition), border-color var(--theme-transition);
}

.filter-container label,
.filter-container .col-form-label {
    color: var(--theme-text) !important;
}

/* ── Table thead-light override ─────────────────────────────── */
body[data-theme="dark"] .thead-light th,
body[data-theme="dark"] .thead-dark th,
body[data-theme="dark"] table thead th {
    background-color: var(--theme-table-head) !important;
    border-color: var(--theme-table-border) !important;
    color: var(--theme-text-muted) !important;
}

/* ── Bulk toolbar ────────────────────────────────────────────── */
body[data-theme="dark"] #bulk-toolbar {
    background-color: var(--theme-bg3) !important;
    border-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] #bulk-toolbar .font-weight-bold {
    color: var(--theme-text) !important;
}

/* ── Photo placeholder ───────────────────────────────────────── */
body[data-theme="dark"] .no-photo-placeholder {
    background-color: var(--theme-bg3) !important;
    border-color: var(--theme-card-border) !important;
}

/* ── Pagination ─────────────────────────────────────────────── */
body[data-theme="dark"] .page-link {
    background-color: var(--theme-card) !important;
    border-color: var(--theme-card-border) !important;
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .page-item.active .page-link {
    background-color: #826eff !important;
    border-color: #826eff !important;
    color: #fff !important;
}

body[data-theme="dark"] .page-item.disabled .page-link {
    background-color: var(--theme-bg3) !important;
    color: var(--theme-text-muted) !important;
}

/* ── Content header breadcrumb ───────────────────────────────── */
body[data-theme="dark"] .content-header {
    background-color: transparent !important;
}

/* ============================================================
   Dark mode: ML / Shopee / TikTok orders – custom classes
   ============================================================ */

/* Cards de pedido, item, valores e datas */
body[data-theme="dark"] .order-summary,
body[data-theme="dark"] .item-row,
body[data-theme="dark"] .enhanced-values-card,
body[data-theme="dark"] .enhanced-values-card-expanded,
body[data-theme="dark"] .enhanced-dates-card {
    background: var(--theme-card) !important;
    border-color: var(--theme-card-border) !important;
    box-shadow: var(--theme-card-shadow) !important;
}

/* Lucro positivo / negativo — preservar cores mesmo no dark */
body[data-theme="dark"] .profit-line.positive .value-icon-enhanced,
body[data-theme="dark"] .profit-line.positive .value-amount-enhanced,
body[data-theme="dark"] .profit-line.positive .margin-info,
body[data-theme="dark"] .revenue-line .value-icon-enhanced,
body[data-theme="dark"] .revenue-line .value-amount-enhanced {
    color: #4ade80 !important;
}

body[data-theme="dark"] .profit-line.negative .value-icon-enhanced,
body[data-theme="dark"] .profit-line.negative .value-amount-enhanced,
body[data-theme="dark"] .profit-line.negative .margin-info {
    color: #f87171 !important;
}

/* Cabeçalho da tabela enhanced */
body[data-theme="dark"] .thead-enhanced {
    background: var(--theme-table-head) !important;
    border-color: var(--theme-table-border) !important;
}

body[data-theme="dark"] .compact-header {
    background: var(--theme-table-head) !important;
    color: var(--theme-text-muted) !important;
    border-color: var(--theme-table-border) !important;
}

/* Linha de pedido */
body[data-theme="dark"] .enhanced-order-row {
    border-color: var(--theme-card-border) !important;
}

body[data-theme="dark"] .enhanced-order-row:hover {
    background-color: var(--theme-bg3) !important;
}

/* Separadores internos */
body[data-theme="dark"] .item-header-compact,
body[data-theme="dark"] .value-line,
body[data-theme="dark"] .date-line {
    border-color: var(--theme-card-border) !important;
}

/* Textos hardcoded */
body[data-theme="dark"] .item-title-enhanced,
body[data-theme="dark"] .value-amount-enhanced,
body[data-theme="dark"] .date-value-enhanced,
body[data-theme="dark"] .stock-count,
body[data-theme="dark"] .logistics-type {
    color: var(--theme-text) !important;
}

body[data-theme="dark"] .value-label-enhanced,
body[data-theme="dark"] .date-label-enhanced,
body[data-theme="dark"] .info-label,
body[data-theme="dark"] .info-icon,
body[data-theme="dark"] .value-icon-enhanced,
body[data-theme="dark"] .date-icon-enhanced {
    color: var(--theme-text-muted) !important;
}

/* Links de pedido / item */
body[data-theme="dark"] .order-link,
body[data-theme="dark"] .item-id-link {
    color: #a78bfa !important;
}

body[data-theme="dark"] .order-link:hover,
body[data-theme="dark"] .item-id-link:hover {
    color: #c4b5fd !important;
}

/* SKU badges */
body[data-theme="dark"] .sku-valid {
    background: rgba(40,167,69,0.2) !important;
    color: #6ee7a0 !important;
}

body[data-theme="dark"] .sku-adjusted {
    background: rgba(0,123,255,0.2) !important;
    color: #93c5fd !important;
}

body[data-theme="dark"] .sku-error {
    background: rgba(220,53,69,0.2) !important;
    color: #fca5a5 !important;
}

/* Thumbnail border */
body[data-theme="dark"] .item-thumbnail {
    border-color: var(--theme-card-border) !important;
}
