/* Visual surfaces only. Never target generic div, grid, form controls or tables. */
html body div:is(.box,.panel,.card,.small-box,.info-box,.nav-tabs-custom,
    .modal-content,.app-dialog,.company-signature-card,.company-signature-heading,
    .favorite-card,.app-detail-section,.swal2-popup,.swal2-modal):not(.swal2-toast) {
    border: 1px solid #E4E6EF !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
/* Square the painted caps without touching their children or layout dimensions. */
html body div:is(
    .box-header,.box-footer,.panel-heading,.panel-footer,.card-header,.card-footer,
    .modal-header,.modal-footer),
html body div.favorite-card-surface {
    border-radius: 0 !important;
}
html body div:is(
    .box-header,.panel-heading,.card-header,.modal-header):not(:has(input:not([type="hidden"]),select,textarea,.form-group,table)) {
    background-color: var(--app-shell-color, #222D32) !important;
    color: #fff;
}
html body div:is(
    .box-header,.panel-heading,.card-header,.modal-header):not(:has(input:not([type="hidden"]),select,textarea,.form-group,table)) > :is(.box-title,.panel-title,.card-title,.modal-title) {
    color: inherit;
}

/* Dialog surfaces do not inherit the border used for ordinary page panels. */
html body div:is(.modal-content,.app-dialog,.swal2-popup,.swal2-modal):not(.swal2-toast) {
    border: 0 !important;
}
