/* ── Mejorar contraste de cards en todos los temas ── */
.card {
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.card .card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* ── Mejorar contraste de textos en tablas y cards ── */
.table td,
.table th {
    color: var(--bs-body-color) !important;
}

.table td small,
.table td .text-muted {
    color: rgba(0, 0, 0, 0.55) !important;
}

.card .card-body,
.card .card-body p,
.card .card-body span:not(.badge),
.card .card-body small,
.card .card-body td,
.card .card-body th {
    color: var(--bs-body-color) !important;
}

.card .card-body .text-muted {
    color: rgba(0, 0, 0, 0.55) !important;
}

/* ── Resaltar fondos de formularios (compatible con todos los temas) ── */
body.form-bg-highlight {
    background-color: color-mix(in srgb, var(--bs-primary-bg-subtle) 10%, white) !important;
}

body.form-bg-highlight .card {
    background-color: color-mix(in srgb, var(--bs-primary-bg-subtle) 10%, white) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10) !important;
}

body.form-bg-highlight .card .card-header {
    background-color: color-mix(in srgb, var(--app-nav-bg) 100%, white) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--app-nav-bg) 100%, white) !important;
    color: #fff !important;
}

/* Textos del header en blanco */
body.form-bg-highlight .card .card-header *,
body.form-bg-highlight .card .card-header .card-title {
    color: #fff !important;
}

body.form-bg-highlight .card .card-body .form-control,
body.form-bg-highlight .card .card-body .form-select {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid color-mix(in srgb, var(--bs-primary-border-subtle) 50%, white) !important;
}

body.form-bg-highlight .card .card-body .form-control.bg-light,
body.form-bg-highlight .card .card-body input[readonly],
body.form-bg-highlight .card .card-body textarea[readonly] {
    background-color: color-mix(in srgb, var(--bs-secondary-bg) 60%, white) !important;
}
