/* ===================================================================
   Pak Sender — nova-dark.css
   Loaded LAST (end of <body>) so it overrides page-level <style> blocks
   that hard-code light colours. Only acts in dark mode. Admin + user.
   Documents meant to stay white (printed invoices, emails, srcdoc
   iframes) are intentionally NOT touched here.
   =================================================================== */

/* ---- broad containers / surfaces ---- */
html[data-theme=dark] .card,
html[data-theme=dark] .panel,
html[data-theme=dark] .well,
html[data-theme=dark] .box,
html[data-theme=dark] .tile,
html[data-theme=dark] .widget{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .card-header,
html[data-theme=dark] .card-footer{background:transparent!important;color:var(--text)!important;border-color:var(--border)!important}

/* ---- generic bg/text utilities ---- */
html[data-theme=dark] .bg-white,
html[data-theme=dark] .bg-light,
html[data-theme=dark] .bg-body,
html[data-theme=dark] .bg-body-tertiary,
html[data-theme=dark] .bg-body-secondary,
html[data-theme=dark] .bg-gray-50,
html[data-theme=dark] .bg-gray-100,
html[data-theme=dark] .bg-gray-200,
html[data-theme=dark] .bg-slate-50,
html[data-theme=dark] .bg-slate-100{background:var(--surface)!important;color:var(--text)!important}
html[data-theme=dark] .bg-light-subtle,
html[data-theme=dark] .bg-secondary-subtle,
html[data-theme=dark] .bg-info-subtle,
html[data-theme=dark] .bg-primary-subtle{background:var(--surface2)!important;color:var(--text)!important}
html[data-theme=dark] .bg-warning-subtle{background:color-mix(in srgb,#f59e0b 16%,transparent)!important;color:var(--text)!important}
html[data-theme=dark] .bg-success-subtle{background:color-mix(in srgb,#16a34a 16%,transparent)!important;color:var(--text)!important}
html[data-theme=dark] .text-dark,
html[data-theme=dark] .text-black,
html[data-theme=dark] .text-body,
html[data-theme=dark] .text-gray-900,
html[data-theme=dark] .text-gray-800,
html[data-theme=dark] .text-slate-900{color:var(--text)!important}
html[data-theme=dark] .text-gray-700,
html[data-theme=dark] .text-gray-600,
html[data-theme=dark] .text-gray-500,
html[data-theme=dark] .text-secondary,
html[data-theme=dark] .text-muted{color:var(--muted)!important}

/* ---- inline style="" light values ---- */
html[data-theme=dark] [style*="background:#fff"],
html[data-theme=dark] [style*="background: #fff"],
html[data-theme=dark] [style*="background:#ffffff"],
html[data-theme=dark] [style*="background:#f8f9fa"],
html[data-theme=dark] [style*="background:#f9fafb"],
html[data-theme=dark] [style*="background:#f1f5f9"],
html[data-theme=dark] [style*="background:#fafafa"],
html[data-theme=dark] [style*="background-color:#fff"],
html[data-theme=dark] [style*="background-color: #fff"]{background:var(--surface)!important}
html[data-theme=dark] [style*="color:#2d3748"],
html[data-theme=dark] [style*="color:#1e293b"],
html[data-theme=dark] [style*="color:#111"],
html[data-theme=dark] [style*="color:#222"],
html[data-theme=dark] [style*="color:#333"],
html[data-theme=dark] [style*="color: #333"],
html[data-theme=dark] [style*="color:#0f172a"],
html[data-theme=dark] [style*="color:#1a202c"]{color:var(--text)!important}
html[data-theme=dark] [style*="color:#666"],
html[data-theme=dark] [style*="color:#64748b"],
html[data-theme=dark] [style*="color:#6b7280"],
html[data-theme=dark] [style*="color:#718096"],
html[data-theme=dark] [style*="color:#999"]{color:var(--muted)!important}
html[data-theme=dark] [style*="border:1px solid #e"],
html[data-theme=dark] [style*="border: 1px solid #e"],
html[data-theme=dark] [style*="border-color:#e"]{border-color:var(--border)!important}

/* ---- tables (all variants) ---- */
html[data-theme=dark] .table{--bs-table-bg:transparent!important;--bs-table-color:var(--text)!important;color:var(--text)!important}
html[data-theme=dark] .table>:not(caption)>*>*{background-color:transparent!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .table-bordered>:not(caption)>*>*{border-color:var(--border)!important}
html[data-theme=dark] thead.table-light th,
html[data-theme=dark] .table-light>:not(caption)>*>*{background:var(--surface2)!important;color:var(--text2)!important}
html[data-theme=dark] .table-hover>tbody>tr:hover>*{background:color-mix(in srgb,var(--accent) 8%,transparent)!important}

/* ---- forms ---- */
html[data-theme=dark] .form-control,
html[data-theme=dark] .form-select,
html[data-theme=dark] textarea,
html[data-theme=dark] input[type=text],
html[data-theme=dark] input[type=email],
html[data-theme=dark] input[type=password],
html[data-theme=dark] input[type=number],
html[data-theme=dark] input[type=search],
html[data-theme=dark] input[type=tel],
html[data-theme=dark] input[type=url],
html[data-theme=dark] input[type=date]{background:var(--surface2)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .form-control::placeholder,
html[data-theme=dark] textarea::placeholder{color:var(--muted)!important}
html[data-theme=dark] .input-group-text{background:var(--surface2)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .progress{background:var(--surface2)!important}

/* ---- modals / offcanvas / dropdowns / list groups / borders ---- */
html[data-theme=dark] .modal-content,
html[data-theme=dark] .modal-header,
html[data-theme=dark] .modal-body,
html[data-theme=dark] .modal-footer{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .offcanvas,
html[data-theme=dark] .toast,
html[data-theme=dark] .popover{background:var(--surface)!important;color:var(--text)!important}
html[data-theme=dark] .dropdown-menu{background:var(--surface)!important;border-color:var(--border)!important}
html[data-theme=dark] .list-group-item{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .border,
html[data-theme=dark] .border-top,
html[data-theme=dark] .border-bottom,
html[data-theme=dark] .border-start,
html[data-theme=dark] .border-end{border-color:var(--border)!important}
html[data-theme=dark] hr{border-color:var(--border)!important}
html[data-theme=dark] .alert-light{background:var(--surface2)!important;color:var(--text)!important;border-color:var(--border)!important}

/* ---- page-specific custom classes found across the app ---- */
html[data-theme=dark] .pf-tag{background:color-mix(in srgb,var(--accent) 14%,transparent)!important;color:var(--accent)!important}
html[data-theme=dark] .kyc-file-box{background:var(--surface2)!important;border-color:var(--border)!important;color:var(--text)!important}
html[data-theme=dark] .chip{background:color-mix(in srgb,var(--accent) 14%,transparent)!important;color:var(--accent)!important;border-color:color-mix(in srgb,var(--accent) 30%,var(--border))!important}
html[data-theme=dark] .preset{background:var(--surface2)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .bk-stat{background:var(--surface2)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme=dark] .ct-hero{background:linear-gradient(135deg,var(--accent),var(--accent-2))!important;color:#fff!important}
html[data-theme=dark] .ct-info i{background:color-mix(in srgb,var(--accent) 16%,transparent)!important;color:var(--accent)!important}
html[data-theme=dark] .api-ex{background:var(--surface)!important;border-color:var(--border)!important;color:var(--text)!important}
html[data-theme=dark] .sms-bubble{background:var(--surface2)!important;color:var(--text)!important}
html[data-theme=dark] .status-paused{background:color-mix(in srgb,#f59e0b 18%,transparent)!important;color:#fbbf24!important}

/* ---- WhatsApp inbox ---- */
html[data-theme=dark] .wa-wrap{background:var(--surface)!important;border-color:var(--border)!important}
html[data-theme=dark] .wa-qr{background:var(--surface2)!important;color:var(--text)!important}
html[data-theme=dark] .wa-in{background:var(--surface2)!important;color:var(--text)!important}
html[data-theme=dark] .wa-b{color:var(--text)!important}
