/**
 * Proxy panel form contrast — load LAST (beats Bootstrap white .form-control).
 * Applies on EPYC / Guard / valy1 (body.dgs-premium).
 */
body.dgs-premium #layout-wrapper input.form-control,
body.dgs-premium #layout-wrapper input.form-control-sm,
body.dgs-premium #layout-wrapper textarea.form-control,
body.dgs-premium #layout-wrapper select.form-control,
body.dgs-premium #layout-wrapper select.form-select,
body.dgs-premium #layout-wrapper .form-select,
body.dgs-premium #layout-wrapper .form-control,
body.dgs-premium #layout-wrapper .form-control-sm,
body.dgs-premium #layout-wrapper input[type="text"],
body.dgs-premium #layout-wrapper input[type="number"],
body.dgs-premium #layout-wrapper input[type="password"],
body.dgs-premium #layout-wrapper input[type="search"],
body.dgs-premium #layout-wrapper input[type="email"],
body.dgs-premium #layout-wrapper .dgs-input-contrast,
body.dgs-premium .dgs-input-contrast,
body.dgs-premium #lhNginxCapacity input,
body.dgs-premium #dashNxtMask input,
body.dgs-premium #dashLiveRelay input,
body.dgs-premium #dashNginxCapacity input {
    background-color: #0b1220 !important;
    background-image: none !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.45) !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #38bdf8 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    opacity: 1 !important;
}

body.dgs-premium #layout-wrapper input.form-control::placeholder,
body.dgs-premium #layout-wrapper .form-control::placeholder,
body.dgs-premium #layout-wrapper .form-control-sm::placeholder,
body.dgs-premium #lhNginxCapacity input::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

body.dgs-premium #layout-wrapper input.form-control:focus,
body.dgs-premium #layout-wrapper .form-control:focus,
body.dgs-premium #layout-wrapper .form-control-sm:focus,
body.dgs-premium #lhNginxCapacity input:focus {
    background-color: #0b1220 !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25) !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Autofill (Chrome) — prevent yellow/white paint with invisible text */
body.dgs-premium #layout-wrapper input.form-control:-webkit-autofill,
body.dgs-premium #layout-wrapper input.form-control:-webkit-autofill:hover,
body.dgs-premium #layout-wrapper input.form-control:-webkit-autofill:focus,
body.dgs-premium #lhNginxCapacity input:-webkit-autofill {
    -webkit-text-fill-color: #f8fafc !important;
    box-shadow: 0 0 0 1000px #0b1220 inset !important;
    transition: background-color 99999s ease-out;
}

/* Dashboard rail cards — stronger readable type */
body.dgs-premium .dgs-dash-rail .dash-nxt-mask,
body.dgs-premium .dgs-dash-rail .dash-live-relay,
body.dgs-premium .dgs-dash-rail .dash-nginx-capacity {
    color: #e2e8f0 !important;
}

body.dgs-premium .dgs-dash-rail .dash-main-stats-group-label {
    color: #f1f5f9 !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
}

body.dgs-premium .dgs-dash-rail .dash-nxt-mask-hint,
body.dgs-premium .dgs-dash-rail .dash-nxt-mask-meta,
body.dgs-premium #dashNginxCapacitySummary,
body.dgs-premium #dashLiveRelayActive,
body.dgs-premium #dashNginxCapacityMeta {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
}

body.dgs-premium .dgs-dash-rail .dash-nxt-mask-val,
body.dgs-premium .dgs-dash-rail code {
    color: #f8fafc !important;
    font-weight: 600 !important;
}

body.dgs-premium .dgs-dash-rail .dash-live-relay-label {
    color: #f8fafc !important;
    font-weight: 700 !important;
}

body.dgs-premium #lhNginxCapacity .table td,
body.dgs-premium #lhNginxCapacity .table code,
body.dgs-premium #lhNginxCapacity strong {
    color: #f1f5f9 !important;
    font-weight: 600;
}

body.dgs-premium #lhNginxCapacity .form-label {
    color: #e2e8f0 !important;
    font-weight: 700 !important;
}

/* Lumen (light) theme: dark text on white fields */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper input.form-control,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .form-control,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .form-control-sm,
html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity input {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .form-control::placeholder,
html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity input::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

/*
 * Bootstrap .card-header is #f1f5f7 (almost white). Dark theme uses light text → invisible titles.
 * Force dark headers/footers everywhere in the proxy panel.
 */
body.dgs-premium #layout-wrapper .card > .card-header,
body.dgs-premium #layout-wrapper .card-header,
body.dgs-premium .card.dgs-premium-card > .card-header,
body.dgs-premium .dgs-premium-card .card-header {
    background: #111827 !important;
    background-color: #111827 !important;
    background-image: none !important;
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
    font-weight: 700 !important;
}

body.dgs-premium #layout-wrapper .card > .card-header *,
body.dgs-premium #layout-wrapper .card-header *,
body.dgs-premium .dgs-premium-card .card-header * {
    color: #f8fafc !important;
}

body.dgs-premium #layout-wrapper .card-header .text-muted,
body.dgs-premium #layout-wrapper .card-header small,
body.dgs-premium #layout-wrapper .card-header .small {
    color: #cbd5e1 !important;
}

body.dgs-premium #layout-wrapper .card-header .btn-outline-secondary,
body.dgs-premium #layout-wrapper .card-header .btn-outline-light {
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
    background: transparent !important;
}

body.dgs-premium #layout-wrapper .card-header .btn-outline-secondary:hover,
body.dgs-premium #layout-wrapper .card-header .btn-outline-light:hover {
    color: #0f172a !important;
    background: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
}

body.dgs-premium #layout-wrapper .card > .card-footer,
body.dgs-premium #layout-wrapper .card-footer {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body.dgs-premium #layout-wrapper .table thead th,
body.dgs-premium #layout-wrapper .table > thead {
    color: #f1f5f9 !important;
    background: transparent !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

/* Lumen: keep light card headers with dark text */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card > .card-header,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header,
html[data-theme="lumen"] body.dgs-premium .dgs-premium-card .card-header {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35) !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header *,
html[data-theme="lumen"] body.dgs-premium .dgs-premium-card .card-header * {
    color: #0f172a !important;
}

/* === outline button contrast (all themes) === */
/*
 * Bootstrap / Skote packs .btn-outline-light { color:#212529 } which is unreadable
 * on dark themes. Theme-token based contrast; lumen stays dark-on-light.
 * CSS only — no PHP / settings / behaviour changes.
 */
body.dgs-premium #layout-wrapper .btn-outline-light,
body.dgs-premium .btn-outline-light,
body.dgs-premium #layout-wrapper a.btn-outline-light,
body.dgs-premium a.btn-outline-light {
    color: var(--dgs-p-text, #f1f5f9) !important;
    border-color: color-mix(in srgb, var(--dgs-p-text, #f1f5f9) 42%, transparent) !important;
    background-color: transparent !important;
    -webkit-text-fill-color: var(--dgs-p-text, #f1f5f9) !important;
}

body.dgs-premium #layout-wrapper .btn-outline-light:hover,
body.dgs-premium #layout-wrapper .btn-outline-light:focus,
body.dgs-premium #layout-wrapper .btn-outline-light:active,
body.dgs-premium .btn-outline-light:hover,
body.dgs-premium .btn-outline-light:focus,
body.dgs-premium .btn-outline-light:active,
body.dgs-premium #layout-wrapper a.btn-outline-light:hover,
body.dgs-premium a.btn-outline-light:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: var(--dgs-accent-dim, rgba(59, 130, 246, 0.18)) !important;
    border-color: var(--dgs-accent-border, rgba(59, 130, 246, 0.42)) !important;
}

body.dgs-premium #layout-wrapper .btn-outline-secondary,
body.dgs-premium .btn-outline-secondary,
body.dgs-premium #layout-wrapper a.btn-outline-secondary {
    color: var(--dgs-p-text, #f1f5f9) !important;
    border-color: color-mix(in srgb, var(--dgs-p-muted, #94a3b8) 55%, transparent) !important;
    background-color: transparent !important;
    -webkit-text-fill-color: var(--dgs-p-text, #f1f5f9) !important;
}

body.dgs-premium #layout-wrapper .btn-outline-secondary:hover,
body.dgs-premium .btn-outline-secondary:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: var(--dgs-accent-dim, rgba(59, 130, 246, 0.18)) !important;
    border-color: var(--dgs-accent-border, rgba(59, 130, 246, 0.42)) !important;
}

/* === Lumen (light) — full contrast pass === */
/*
 * Dark-theme hardcodes above force light text / dark chrome.
 * Lumen is pale surfaces → need dark type, light chrome, and dark outline labels
 * (including :focus/:active — general rules paint white text which vanishes on pale hover).
 */
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-nxt-mask,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-live-relay,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-nginx-capacity,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-main-stats-group-label,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-nxt-mask-val,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-live-relay-label,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail code {
    color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-nxt-mask-hint,
html[data-theme="lumen"] body.dgs-premium .dgs-dash-rail .dash-nxt-mask-meta,
html[data-theme="lumen"] body.dgs-premium #dashNginxCapacitySummary,
html[data-theme="lumen"] body.dgs-premium #dashLiveRelayActive,
html[data-theme="lumen"] body.dgs-premium #dashNginxCapacityMeta {
    color: #475569 !important;
}

html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity .table td,
html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity .table code,
html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity strong,
html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity .form-label {
    color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card > .card-footer,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-footer {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table thead th,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table > thead {
    color: #0f172a !important;
    background: transparent !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .text-muted,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header small,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .small {
    color: #64748b !important;
}

/* Outline buttons — beat card-header light-text rules + white hover/focus */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-light,
html[data-theme="lumen"] body.dgs-premium .btn-outline-light,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper a.btn-outline-light,
html[data-theme="lumen"] body.dgs-premium a.btn-outline-light,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-secondary,
html[data-theme="lumen"] body.dgs-premium .btn-outline-secondary,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper a.btn-outline-secondary,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .btn-outline-light,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .btn-outline-secondary,
html[data-theme="lumen"] body.dgs-premium .dgs-premium-card .card-header .btn-outline-light,
html[data-theme="lumen"] body.dgs-premium .dgs-premium-card .card-header .btn-outline-secondary {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    border-color: rgba(30, 41, 59, 0.32) !important;
    background-color: transparent !important;
    background-image: none !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-light:focus,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-light:active,
html[data-theme="lumen"] body.dgs-premium .btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium .btn-outline-light:focus,
html[data-theme="lumen"] body.dgs-premium .btn-outline-light:active,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper a.btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium a.btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-secondary:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-secondary:focus,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-secondary:active,
html[data-theme="lumen"] body.dgs-premium .btn-outline-secondary:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .btn-outline-light:focus,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .btn-outline-secondary:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card-header .btn-outline-secondary:focus {
    color: #312e81 !important;
    -webkit-text-fill-color: #312e81 !important;
    background-color: rgba(79, 70, 229, 0.12) !important;
    border-color: rgba(79, 70, 229, 0.42) !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper input.form-control:-webkit-autofill,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper input.form-control:-webkit-autofill:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper input.form-control:-webkit-autofill:focus,
html[data-theme="lumen"] body.dgs-premium #lhNginxCapacity input:-webkit-autofill {
    -webkit-text-fill-color: #0f172a !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
}

/* === lumen residual: module cards + tables === */
/*
 * Security Center module cards are dark navy by default (worldshield-v7).
 * On Lumen they must become light surfaces — otherwise outline labels fight
 * global Lumen dark-text rules (and those rules win via #layout-wrapper).
 */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card,
html[data-theme="lumen"] body.dgs-premium .ws-module-card {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card:hover,
html[data-theme="lumen"] body.dgs-premium .ws-module-card:hover {
    border-color: rgba(79, 70, 229, 0.35) !important;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08) !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .ws-module-title,
html[data-theme="lumen"] body.dgs-premium .ws-module-card .ws-module-title {
    color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .ws-module-desc,
html[data-theme="lumen"] body.dgs-premium .ws-module-card .ws-module-desc {
    color: #64748b !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .ws-pill,
html[data-theme="lumen"] body.dgs-premium .ws-module-card .ws-pill {
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4338ca !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-hero,
html[data-theme="lumen"] body.dgs-premium .ws-hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), transparent 55%) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-hero h4,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-hero h5,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-hero p,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-hero .text-muted {
    color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-hero .text-muted {
    color: #64748b !important;
}

/* Outline on light module cards — dark labels (beat any leftover light-text rules) */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-light,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card a.btn-outline-light,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-secondary,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card a.btn-outline-secondary,
html[data-theme="lumen"] body.dgs-premium .ws-module-card .btn-outline-light,
html[data-theme="lumen"] body.dgs-premium .ws-module-card a.btn-outline-light {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    border-color: rgba(30, 41, 59, 0.28) !important;
    background-color: transparent !important;
    background-image: none !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-light:focus,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-light:active,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card a.btn-outline-light:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-secondary:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .ws-module-card .btn-outline-secondary:focus {
    color: #312e81 !important;
    -webkit-text-fill-color: #312e81 !important;
    background-color: rgba(79, 70, 229, 0.1) !important;
    border-color: rgba(79, 70, 229, 0.4) !important;
}

/* Tables (incl. table-dark on users.php): dark type on pale stripes */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-dark,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper table.table-dark {
    --bs-table-color: #0f172a !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: rgba(148, 163, 184, 0.35) !important;
    --bs-table-striped-bg: rgba(241, 245, 249, 0.95) !important;
    --bs-table-striped-color: #0f172a !important;
    --bs-table-hover-bg: rgba(79, 70, 229, 0.08) !important;
    --bs-table-hover-color: #0f172a !important;
    --bs-table-active-color: #0f172a !important;
    color: #0f172a !important;
    background-color: transparent !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table td,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table th,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-dark td,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-dark th,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-striped > tbody > tr > *,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-dark.table-striped > tbody > tr > *,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-striped > tbody > tr:nth-of-type(even) > *,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table tbody tr:hover > * {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table thead th,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .table-dark thead th {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    background: #f8fafc !important;
}

/* Outline primary/danger (Edit / Delete) — readable on Lumen */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-primary,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper a.btn-outline-primary {
    color: #4338ca !important;
    -webkit-text-fill-color: #4338ca !important;
    border-color: rgba(79, 70, 229, 0.45) !important;
    background-color: transparent !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-primary:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-primary:focus,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper a.btn-outline-primary:hover {
    color: #312e81 !important;
    -webkit-text-fill-color: #312e81 !important;
    background-color: rgba(79, 70, 229, 0.12) !important;
    border-color: rgba(79, 70, 229, 0.55) !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-danger,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper a.btn-outline-danger,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper button.btn-outline-danger {
    color: #b91c1c !important;
    -webkit-text-fill-color: #b91c1c !important;
    border-color: rgba(185, 28, 28, 0.45) !important;
    background-color: transparent !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-danger:hover,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .btn-outline-danger:focus,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper button.btn-outline-danger:hover {
    color: #7f1d1d !important;
    -webkit-text-fill-color: #7f1d1d !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(185, 28, 28, 0.55) !important;
}

/* Badges: keep white label on saturated bg (Bootstrap), not ghost-on-white */
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.badge-danger,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.bg-danger {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #dc2626 !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.badge-primary,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.bg-primary {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #4f46e5 !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.badge-secondary,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.bg-secondary {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #64748b !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.badge-info,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .badge.bg-info {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #0284c7 !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card .card-body,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card .card-title,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card .form-label,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card strong {
    color: #0f172a !important;
}

html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card .text-muted,
html[data-theme="lumen"] body.dgs-premium #layout-wrapper .card small.text-muted {
    color: #64748b !important;
}
