/* ==========================================================================
   The Acres Cloud — global pastel premium theme (web)
   Loaded after every page's own styles. Visual only: no markup or behaviour changes.
   Palette: violet #8b5cf6 (primary), pink #ec4899, sky #0ea5e9, mint #10b981, amber #f59e0b
   ========================================================================== */

:root {
    --da-primary: #8b5cf6;
    --da-primary-dark: #7c3aed;
    --da-bg: #f7f5fd;
    --px-ink: #1e1b4b;
    --px-muted: #6b6394;
    --px-line: #eeebfb;
    --px-soft: #f5f3ff;
    --bs-primary: #8b5cf6;
    --bs-primary-rgb: 139, 92, 246;
    --bs-link-color: #7c3aed;
    --bs-link-hover-color: #6d28d9;
}

/* ---------- Page canvas ---------- */
body {
    background:
        radial-gradient(1100px 560px at 100% -10%, #fdf2f8 0%, transparent 60%),
        radial-gradient(900px 520px at -5% 0%, #eef2ff 0%, transparent 55%),
        radial-gradient(800px 500px at 50% 110%, #ecfeff 0%, transparent 60%),
        #f8f7fd !important;
    background-attachment: fixed !important;
    color: #1e293b;
}
.topbar {
    background: rgba(255, 255, 255, .78) !important;
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border-bottom: 1px solid var(--px-line) !important;
    box-shadow: 0 10px 30px -26px rgba(76, 29, 149, .6) !important;
}
::selection { background: #ddd6fe; color: var(--px-ink); }

/* ---------- Typography accents ---------- */
.text-primary { color: #7c3aed !important; }
a { color: #7c3aed; }
a:hover { color: #6d28d9; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { color: var(--px-ink); }

/* ---------- Cards & surfaces ---------- */
.main-content .card,
.card-custom {
    border: 1px solid var(--px-line) !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 0 #fff inset, 0 20px 44px -38px rgba(30, 27, 75, .55) !important;
}
.main-content .card:hover { box-shadow: 0 1px 0 #fff inset, 0 26px 50px -36px rgba(30, 27, 75, .55) !important; }
.main-content .card-header {
    background: linear-gradient(120deg, #faf9ff, #fdf8fc) !important;
    border-bottom: 1px solid var(--px-line) !important;
}
.main-content .bg-light { background-color: #faf9ff !important; }
.main-content .border { border-color: var(--px-line) !important; }
.shadow-sm { box-shadow: 0 14px 30px -26px rgba(30, 27, 75, .5) !important; }
.rounded-4 { border-radius: 20px !important; }

/* ---------- Buttons: soft pastel system ----------
   Every button = pastel fill + deep "ink" text of the same hue.
   Hover/focus/active only deepen the pastel a little; text colour never changes,
   so nothing disappears on hover (the old layout CSS turned hover text white). */
.btn { border-radius: 12px; font-weight: 700; letter-spacing: .1px; transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease, filter .15s ease !important; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(167, 139, 250, .28) !important; }

/* Primary (violet) — also the "selected" state of outline-primary filters */
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-outline-primary.active, .btn-outline-primary:active,
.btn-check:checked + .btn-outline-primary {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%) !important;
    border: 1px solid #c4b5fd !important;
    color: #4c1d95 !important;
    box-shadow: 0 10px 22px -16px rgba(124, 58, 237, .75), inset 0 1px 0 #fff !important;
}
.btn-primary:hover, .btn-check:checked + .btn-outline-primary:hover, .btn-outline-primary.active:hover {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%) !important;
}

/* Lilac (purple) */
.btn-purple, .btn-purple:hover,
.btn-outline-purple.active, .btn-outline-purple:active,
.btn-check:checked + .btn-outline-purple, .btn-check:checked + .category-btn-commercial {
    background: linear-gradient(135deg, #fae8ff 0%, #f5d0fe 100%) !important;
    border: 1px solid #f0abfc !important;
    color: #86198f !important;
    box-shadow: 0 10px 22px -16px rgba(192, 38, 211, .7), inset 0 1px 0 #fff !important;
}

/* Status colours */
.btn-success, .btn-success:hover, .btn-success:focus, .btn-success:active { background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important; border: 1px solid #a7f3d0 !important; color: #065f46 !important; box-shadow: 0 10px 20px -16px #059669, inset 0 1px 0 #fff !important; }
.btn-danger, .btn-danger:hover, .btn-danger:focus, .btn-danger:active    { background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important; border: 1px solid #fecdd3 !important; color: #9f1239 !important; box-shadow: 0 10px 20px -16px #e11d48, inset 0 1px 0 #fff !important; }
.btn-warning, .btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: linear-gradient(135deg, #fffbeb, #fef3c7) !important; border: 1px solid #fde68a !important; color: #92400e !important; box-shadow: 0 10px 20px -16px #d97706, inset 0 1px 0 #fff !important; }
.btn-info, .btn-info:hover, .btn-info:focus, .btn-info:active             { background: linear-gradient(135deg, #f0f9ff, #e0f2fe) !important; border: 1px solid #bae6fd !important; color: #075985 !important; box-shadow: 0 10px 20px -16px #0284c7, inset 0 1px 0 #fff !important; }
.btn-secondary, .btn-secondary:hover, .btn-secondary:focus                { background: linear-gradient(135deg, #ffffff, #f8fafc) !important; border: 1px solid #e2e8f0 !important; color: #334155 !important; }
.btn-light, .btn-light:hover, .btn-light:focus                            { background: #ffffff !important; border: 1px solid #eeebfb !important; color: #475569 !important; }
.btn-dark, .btn-dark:hover, .btn-dark:focus, .btn-dark:active             { background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important; border: 1px solid #c7d2fe !important; color: #312e81 !important; box-shadow: 0 10px 20px -16px #4338ca, inset 0 1px 0 #fff !important; }
.btn-success:hover { background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important; }
.btn-danger:hover  { background: linear-gradient(135deg, #ffe4e6, #fecdd3) !important; }
.btn-warning:hover { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; }
.btn-info:hover    { background: linear-gradient(135deg, #e0f2fe, #bae6fd) !important; }
.btn-dark:hover    { background: linear-gradient(135deg, #e0e7ff, #c7d2fe) !important; }
.btn-secondary:hover, .btn-light:hover { background: #f8f7ff !important; }

/* Buttons written with a white-text class keep the soft look: their text follows the button colour */
.btn-primary.text-white, .btn-outline-primary.active.text-white { color: #4c1d95 !important; }
.btn-purple.text-white { color: #86198f !important; }
.btn-success.text-white { color: #065f46 !important; }
.btn-danger.text-white  { color: #9f1239 !important; }
.btn-warning.text-white { color: #92400e !important; }
.btn-info.text-white    { color: #075985 !important; }
.btn-dark.text-white    { color: #312e81 !important; }
.btn-primary .text-white, .btn-success .text-white, .btn-danger .text-white, .btn-warning .text-white, .btn-info .text-white, .btn-dark .text-white { color: inherit !important; }

/* ---------- Buttons: outline (white chip, coloured text) ---------- */
.btn-outline-primary, .btn-outline-primary:hover, .btn-outline-primary:focus     { background: #ffffff !important; border: 1px solid #ddd6fe !important; color: #6d28d9 !important; box-shadow: 0 8px 18px -16px #7c3aed !important; }
.btn-outline-purple, .btn-outline-purple:hover, .btn-outline-purple:focus       { background: #ffffff !important; border: 1px solid #f5d0fe !important; color: #a21caf !important; box-shadow: 0 8px 18px -16px #c026d3 !important; }
.btn-outline-success, .btn-outline-success:hover, .btn-outline-success:focus    { background: #ffffff !important; border: 1px solid #bbf7d0 !important; color: #047857 !important; box-shadow: 0 8px 18px -16px #059669 !important; }
.btn-outline-danger, .btn-outline-danger:hover, .btn-outline-danger:focus       { background: #ffffff !important; border: 1px solid #fecdd3 !important; color: #be123c !important; box-shadow: 0 8px 18px -16px #e11d48 !important; }
.btn-outline-warning, .btn-outline-warning:hover, .btn-outline-warning:focus    { background: #ffffff !important; border: 1px solid #fde68a !important; color: #b45309 !important; box-shadow: 0 8px 18px -16px #d97706 !important; }
.btn-outline-info, .btn-outline-info:hover, .btn-outline-info:focus             { background: #ffffff !important; border: 1px solid #bae6fd !important; color: #0369a1 !important; box-shadow: 0 8px 18px -16px #0284c7 !important; }
.btn-outline-secondary, .btn-outline-secondary:hover, .btn-outline-secondary:focus { background: #ffffff !important; border: 1px solid #e2e8f0 !important; color: #475569 !important; }
.btn-outline-dark, .btn-outline-dark:hover, .btn-outline-dark:focus             { background: #ffffff !important; border: 1px solid #c7d2fe !important; color: #312e81 !important; }
.btn-outline-light, .btn-outline-light:hover, .btn-outline-light:focus          { background: rgba(255, 255, 255, .75) !important; border: 1px solid #ffffff !important; color: #4338ca !important; }
.btn-outline-primary:hover   { background: #f5f3ff !important; border-color: #c4b5fd !important; }
.btn-outline-purple:hover    { background: #fdf4ff !important; border-color: #f0abfc !important; }
.btn-outline-success:hover   { background: #f0fdf4 !important; border-color: #a7f3d0 !important; }
.btn-outline-danger:hover    { background: #fff1f2 !important; border-color: #fda4af !important; }
.btn-outline-warning:hover   { background: #fffbeb !important; border-color: #fcd34d !important; }
.btn-outline-info:hover      { background: #f0f9ff !important; border-color: #7dd3fc !important; }
.btn-outline-secondary:hover { background: #f8fafc !important; }
.btn-outline-dark:hover      { background: #eef2ff !important; }
.btn[class*="btn-outline-"]:hover i, .btn[class*="btn-outline-"]:focus i { color: inherit !important; }

/* Selected outline buttons (filters / toggles) */
.btn-check:checked + .btn-outline-success, .btn-outline-success.active { background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important; color: #065f46 !important; border-color: #a7f3d0 !important; }
.btn-check:checked + .btn-outline-danger, .btn-outline-danger.active   { background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important; color: #9f1239 !important; border-color: #fecdd3 !important; }
.btn-check:checked + .btn-outline-warning, .btn-outline-warning.active { background: linear-gradient(135deg, #fffbeb, #fef3c7) !important; color: #92400e !important; border-color: #fde68a !important; }
.btn-check:checked + .btn-outline-info, .btn-outline-info.active       { background: linear-gradient(135deg, #f0f9ff, #e0f2fe) !important; color: #075985 !important; border-color: #bae6fd !important; }
.btn-check:checked + .btn-outline-dark, .btn-outline-dark.active       { background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important; color: #312e81 !important; border-color: #c7d2fe !important; }

/* Disabled stays readable */
.btn:disabled, .btn.disabled { opacity: .55 !important; transform: none !important; }

/* ---------- Forms ---------- */
.main-content .form-control,
.main-content .form-select,
.modal .form-control,
.modal .form-select {
    border-radius: 12px;
    border-color: #e9e5fb !important;
    background-color: #fff;
    color: var(--px-ink);
    font-weight: 500;
}
.main-content .form-control:focus,
.main-content .form-select:focus,
.modal .form-control:focus,
.modal .form-select:focus {
    border-color: #c4b5fd !important;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, .18) !important;
}
.form-control::placeholder { color: #a5a1c2; }
.form-check-input:checked { background-color: #8b5cf6 !important; border-color: #8b5cf6 !important; }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(167, 139, 250, .2) !important; border-color: #c4b5fd !important; }
.input-group-text { background: #faf9ff !important; border-color: #e9e5fb !important; color: #8b5cf6; }
.form-label { color: #4c4675; font-weight: 700; }

/* ---------- Tables ---------- */
.main-content .table > :not(caption) > * > * { border-bottom-color: #f2effc; }
.main-content .table thead th,
.main-content table thead th {
    background: #fbfaff !important;
    color: #7c6fa8 !important;
    font-weight: 800;
    border-bottom: 1px solid var(--px-line) !important;
}
.main-content .table-light, .main-content thead.table-light th { background: #fbfaff !important; }
.main-content .table-hover tbody tr:hover > * { background: #fcfbff !important; }
.main-content .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #fdfcff; }

/* ---------- Tabs & pills ---------- */
.nav-pills .nav-link { border-radius: 12px; font-weight: 700; color: #5b21b6; }
body .nav-pills .nav-link.active, body .nav-pills .show > .nav-link, body .nav-pills .nav-link.active:hover {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe) !important;
    color: #4c1d95 !important;
    box-shadow: 0 10px 20px -16px #7c3aed, inset 0 1px 0 #fff;
}
.nav-tabs { border-bottom-color: var(--px-line) !important; }
.nav-tabs .nav-link { color: #6b6394; font-weight: 700; border-radius: 12px 12px 0 0; }
body .nav-tabs .nav-link.active { color: #6d28d9 !important; border-color: var(--px-line) var(--px-line) #fff !important; }

/* ---------- Badges (soft) ---------- */
.badge { font-weight: 800; letter-spacing: .2px; }
.badge.bg-primary   { background: #ede9fe !important; color: #6d28d9 !important; }
.badge.bg-success   { background: #dcfce7 !important; color: #15803d !important; }
.badge.bg-danger    { background: #ffe4e6 !important; color: #be123c !important; }
.badge.bg-warning   { background: #fef3c7 !important; color: #92400e !important; }
.badge.bg-info      { background: #e0f2fe !important; color: #0369a1 !important; }
.badge.bg-secondary { background: #f1f5f9 !important; color: #475569 !important; }
.badge.bg-dark      { background: #e0e7ff !important; color: #312e81 !important; }
.bg-primary:not(.badge):not(.bg-opacity-10):not(.bg-opacity-25) { background: linear-gradient(135deg, #c4b5fd, #a78bfa) !important; }
.bg-primary-subtle { background-color: #f3f0ff !important; }
.text-bg-primary { background: #ede9fe !important; color: #6d28d9 !important; }

/* ---------- Alerts ---------- */
.alert { border-radius: 16px !important; border: 1px solid transparent; }
.alert-success { background: #ecfdf5 !important; color: #065f46 !important; border-color: #bbf7d0 !important; }
.alert-danger  { background: #fff1f2 !important; color: #9f1239 !important; border-color: #fecdd3 !important; }
.alert-warning { background: #fffbeb !important; color: #92400e !important; border-color: #fde68a !important; }
.alert-info, .alert-primary { background: #f5f3ff !important; color: #4c1d95 !important; border-color: #ddd6fe !important; }

/* ---------- Modals & dropdowns ---------- */
.modal-content { border: 0 !important; border-radius: 22px !important; box-shadow: 0 40px 80px -40px rgba(30, 27, 75, .6) !important; overflow: hidden; }
.modal-header { border-bottom-color: var(--px-line) !important; }
.modal-footer { border-top-color: var(--px-line) !important; }
.modal-backdrop.show { opacity: .35; background: #1e1b4b; }
.dropdown-menu { border: 1px solid var(--px-line) !important; border-radius: 16px !important; box-shadow: 0 24px 50px -30px rgba(30, 27, 75, .55) !important; padding: 6px; }
.dropdown-item { border-radius: 10px; font-weight: 600; }
.dropdown-item:hover, .dropdown-item:focus { background: #f5f3ff !important; color: #4c1d95 !important; }
.dropdown-item.active, .dropdown-item:active { background: #ede9fe !important; color: #4c1d95 !important; }

/* ---------- Pagination ---------- */
.pagination .page-link { border-radius: 10px !important; margin: 0 2px; border-color: var(--px-line) !important; color: #6d28d9 !important; font-weight: 700; }
.pagination .page-item.active .page-link { background: #ede9fe !important; color: #4c1d95 !important; border-color: #c4b5fd !important; }

/* ---------- Progress ---------- */
.progress { background: #f1eefc !important; border-radius: 999px !important; }
.progress-bar { background: linear-gradient(90deg, #a78bfa, #f472b6) !important; }

/* ---------- Scrollbars ---------- */
* { scrollbar-color: #ddd6fe transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e4defc; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #c4b5fd; background-clip: padding-box; }

/* ---------- Gentle entrance for page content ---------- */
@media (prefers-reduced-motion: no-preference) {
    .main-content .card { animation: pxRise .45s cubic-bezier(.2, .8, .2, 1) backwards; }
    @keyframes pxRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- Module heroes that were dark navy ---------- */
.payroll-header-card {
    background: linear-gradient(120deg, #e0e7ff 0%, #f3e8ff 40%, #fce7f3 75%, #fef3c7 100%) !important;
    color: var(--px-ink) !important;
    border: 1px solid #ffffff !important;
    box-shadow: 0 26px 50px -34px rgba(99, 102, 241, .55), inset 0 1px 0 #fff !important;
}
.payroll-header-card::after { background: rgba(255, 255, 255, .45) !important; }
.payroll-header-card h1, .payroll-header-card h2, .payroll-header-card h3,
.payroll-header-card .text-white, .payroll-header-card .fw-bold:not(.badge):not(.btn) { color: var(--px-ink) !important; }
.payroll-header-card p, .payroll-header-card .text-white-50, .payroll-header-card .small, .payroll-header-card .opacity-75 { color: var(--px-muted) !important; }
.payroll-header-card .btn-outline-light { background: rgba(255, 255, 255, .7) !important; border: 1px solid #ffffff !important; color: #4338ca !important; }
.payroll-header-card .badge.bg-dark, .payroll-header-card .badge[style*="rgba(255"] { background: #ffffff !important; color: #4338ca !important; }

/* Saturated solid icon tiles (bg-warning / bg-danger etc. used as icon boxes) */
.main-content .rounded-3.bg-warning:not(.badge), .main-content .rounded-circle.bg-warning:not(.badge) { background: #fef3c7 !important; color: #d97706 !important; }
.main-content .rounded-3.bg-success:not(.badge), .main-content .rounded-circle.bg-success:not(.badge) { background: #dcfce7 !important; color: #16a34a !important; }
.main-content .rounded-3.bg-danger:not(.badge), .main-content .rounded-circle.bg-danger:not(.badge) { background: #ffe4e6 !important; color: #e11d48 !important; }
.main-content .rounded-3.bg-info:not(.badge), .main-content .rounded-circle.bg-info:not(.badge) { background: #e0f2fe !important; color: #0284c7 !important; }
.main-content .rounded-3.bg-warning i, .main-content .rounded-3.bg-success i, .main-content .rounded-3.bg-danger i, .main-content .rounded-3.bg-info i { color: inherit !important; }

/* Soft tint helpers (bg-* with bg-opacity-10/25) stay soft everywhere */
.bg-primary.bg-opacity-10, .bg-primary.bg-opacity-25 { background: #f3f0ff !important; }
.bg-success.bg-opacity-10, .bg-success.bg-opacity-25 { background: #ecfdf5 !important; }
.bg-danger.bg-opacity-10, .bg-danger.bg-opacity-25 { background: #fff1f2 !important; }
.bg-warning.bg-opacity-10, .bg-warning.bg-opacity-25 { background: #fffbeb !important; }
.bg-info.bg-opacity-10, .bg-info.bg-opacity-25 { background: #f0f9ff !important; }
.bg-secondary.bg-opacity-10, .bg-secondary.bg-opacity-25 { background: #f8fafc !important; }
.text-warning { color: #d97706 !important; }
.text-success { color: #059669 !important; }
.text-danger { color: #e11d48 !important; }
.text-info { color: #0284c7 !important; }
body .nav-pills .nav-link.active i, body .nav-pills .nav-link.active .text-white { color: inherit !important; }
body .nav-pills .nav-link:not(.active):hover { background: #f5f3ff; color: #4c1d95; }

/* Plan "BEST VALUE" ribbon: soft honey with dark text */
body .top-tag { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; color: #78350f !important; border: 1px solid #fcd34d; }

/* Topbar back button (every page except the dashboard) */
.topbar-back {
    width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #ece8f7; background: #fff; color: #5b21b6;
    box-shadow: 0 6px 14px -12px rgba(76, 29, 149, .6);
    transition: transform .15s ease, background .15s ease;
}
.topbar-back:hover { background: #f5f3ff; color: #5b21b6; transform: translateX(-2px); }
.topbar-back i { font-size: 1.05rem; }

/* =====================================================================
   NO BLACK IN THE PRODUCT: every dark/slate surface becomes soft pastel
   (headers, heroes, modal headers, dark buttons, chips). The camera
   viewport of the face-unlock stays dark on purpose (#020617 not touched).
   ===================================================================== */
html body .btn-dark, html body .btn-3d-dark,
html body .btn-outline-dark:hover, html body .btn-outline-dark:focus,
html body .btn-outline-secondary:hover {
    background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%) !important;
    color: #4c1d95 !important; border: 1px solid #ddd6fe !important; border-bottom: 3px solid #c4b5fd !important;
    box-shadow: 0 8px 18px -14px rgba(109, 40, 217, .7) !important;
}
html body .crm-search-btn { background: #ede9fe !important; color: #4c1d95 !important; border: 1px solid #c4b5fd !important; }
html body .crm-search-btn:hover { background: #ddd6fe !important; color: #4c1d95 !important; }
html body .view-mode-pill.active { background: #ede9fe !important; color: #4c1d95 !important; border-color: #c4b5fd !important; box-shadow: 0 8px 18px -14px rgba(109, 40, 217, .7) !important; }
html body .rp-chip.active { background: #ede9fe !important; color: #4c1d95 !important; border-color: #c4b5fd !important; }

/* dark heroes / banners / modal headers -> pastel */
html body .payroll-header-card, html body .setup-banner,
html body #universalLeadModal .modal-header, html body #editLeadModal .modal-header,
html body .modal-header[style*="#0f172a"], html body .modal-header[style*="#1e293b"],
html body .card-header[style*="#0f172a"], html body .card-header[style*="#1e293b"],
html body div[style*="linear-gradient(135deg, #0f172a"], html body div[style*="linear-gradient(135deg, #1e293b"],
html body div[style*="linear-gradient(135deg,#0f172a"], html body div[style*="background: #0f172a"],
html body div[style*="background-color: #1e293b"] {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 45%, #fdf2f8 100%) !important;
    color: #1e1b4b !important;
    border-color: #e9e5fb !important;
}
html body :is(.payroll-header-card, .setup-banner, #universalLeadModal .modal-header, #editLeadModal .modal-header,
    .modal-header[style*="#0f172a"], .modal-header[style*="#1e293b"], .card-header[style*="#0f172a"], .card-header[style*="#1e293b"],
    div[style*="linear-gradient(135deg, #0f172a"], div[style*="linear-gradient(135deg, #1e293b"], div[style*="linear-gradient(135deg,#0f172a"],
    div[style*="background: #0f172a"], div[style*="background-color: #1e293b"])
    :is(h1, h2, h3, h4, h5, h6, .modal-title, .text-white:not(.badge):not(.btn), .text-light:not(.badge):not(.btn)) { color: #1e1b4b !important; }
html body :is(.payroll-header-card, .setup-banner, #universalLeadModal .modal-header, #editLeadModal .modal-header,
    .modal-header[style*="#0f172a"], .modal-header[style*="#1e293b"], div[style*="linear-gradient(135deg, #0f172a"], div[style*="linear-gradient(135deg, #1e293b"])
    :is(.text-white-50, .opacity-75, small) { color: #6b6394 !important; }
html body :is(#universalLeadModal .modal-header, #editLeadModal .modal-header, .modal-header[style*="#0f172a"], .modal-header[style*="#1e293b"]) .btn-close-white { filter: none !important; }
/* containers converted at the source (inline pastel gradient) keep readable ink text */
html body [style*="#f5f3ff 0%, #eef2ff 45%"] :is(h1, h2, h3, h4, h5, h6, p, span, div, i, .modal-title, .text-white, .text-light, .text-warning):not(.badge):not(.btn):not(.btn *):not(.badge *) { color: #1e1b4b !important; }
html body [style*="#f5f3ff 0%, #eef2ff 45%"].text-white { color: #1e1b4b !important; }
html body [style*="#f5f3ff 0%, #eef2ff 45%"] :is(.text-white-50, .opacity-75, small) { color: #6b6394 !important; }
html body [style*="#f5f3ff 0%, #eef2ff 45%"] .btn-close-white { filter: none !important; }
html body [style*="#f5f3ff 0%, #eef2ff 45%"] .btn-outline-light { color: #4c1d95 !important; border-color: #c4b5fd !important; background: #fff !important; }
