/* JTDirect global enterprise UI system: neutral typography, restrained accents, semantic statuses. */
:root {
    --jtd-ui-text: #212529;
    --jtd-ui-text-secondary: #495057;
    --jtd-ui-muted: #6c757d;
    --jtd-ui-border: #dee2e6;
    --jtd-ui-canvas: #f6f8fa;
    --jtd-ui-primary: #0d6efd;
    --jtd-status-success-text: #146c43;
    --jtd-status-success-bg: #d1e7dd;
    --jtd-status-warning-text: #664d03;
    --jtd-status-warning-bg: #fff3cd;
    --jtd-status-danger-text: #b02a37;
    --jtd-status-danger-bg: #f8d7da;
    --jtd-status-info-text: #084298;
    --jtd-status-info-bg: #cfe2ff;
    --jtd-status-neutral-text: #495057;
    --jtd-status-neutral-bg: #e9ecef;
}

/* Cards and dashboard widgets: content remains charcoal regardless of decorative accents. */
.card, .card-body, .card-body p, .card-body li, .card-header, .card-footer,
.dashboard-card, .dashboard-widget, .small-box, .info-box {
    color: var(--jtd-ui-text);
}
.card .card-title, .card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.dashboard-card .card-title, .dashboard-widget .card-title,
.small-box .inner h3, .small-box .inner p, .info-box .info-box-text, .info-box .info-box-number {
    color: var(--jtd-ui-text) !important;
}
.card .text-secondary, .card .text-muted, .dashboard-card .text-secondary, .dashboard-widget .text-secondary {
    color: var(--jtd-ui-muted) !important;
}

/* All application grids use dark, readable text; status badges are the exception by design. */
.table, table.dataTable, .dataTables_wrapper, .dataTables_wrapper label,
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter, .table tbody td, table.dataTable tbody td {
    color: #343a40;
}
.table thead th, table.dataTable thead th {
    color: #212529 !important;
    background-color: #f3f5f7;
    border-color: #dee2e6;
}
.table tbody tr, table.dataTable tbody tr { color: #343a40; }
.table tbody td a:not(.btn), table.dataTable tbody td a:not(.btn) { color: #0d6efd; }
.table .btn, table.dataTable .btn { color: inherit; }
.table .btn-primary, .table .btn-success, .table .btn-danger, .table .btn-warning,
table.dataTable .btn-primary, table.dataTable .btn-success, table.dataTable .btn-danger, table.dataTable .btn-warning {
    color: #fff;
}

/* Semantic status pills: light surfaces and status-specific dark text, never default white text. */
.status-badge, .badge.status-success, .badge.status-warning, .badge.status-danger,
.badge.status-info, .badge.status-neutral,
.badge.text-bg-success, .badge.bg-success,
.badge.text-bg-warning, .badge.bg-warning,
.badge.text-bg-danger, .badge.bg-danger,
.badge.text-bg-info, .badge.bg-info,
.badge.text-bg-primary, .badge.bg-primary,
.badge.text-bg-secondary, .badge.bg-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .32rem .62rem;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .01em;
}
.badge.status-success, .badge.text-bg-success, .badge.bg-success { color: var(--jtd-status-success-text) !important; background: var(--jtd-status-success-bg) !important; border-color: #badbcc; }
.badge.status-warning, .badge.text-bg-warning, .badge.bg-warning { color: var(--jtd-status-warning-text) !important; background: var(--jtd-status-warning-bg) !important; border-color: #ffecb5; }
.badge.status-danger, .badge.text-bg-danger, .badge.bg-danger { color: var(--jtd-status-danger-text) !important; background: var(--jtd-status-danger-bg) !important; border-color: #f5c2c7; }
.badge.status-info, .badge.text-bg-info, .badge.bg-info, .badge.text-bg-primary, .badge.bg-primary { color: var(--jtd-status-info-text) !important; background: var(--jtd-status-info-bg) !important; border-color: #b6d4fe; }
.badge.status-neutral, .badge.text-bg-secondary, .badge.bg-secondary { color: var(--jtd-status-neutral-text) !important; background: var(--jtd-status-neutral-bg) !important; border-color: #dee2e6; }
.status-success { color: var(--jtd-status-success-text); }
.status-warning { color: var(--jtd-status-warning-text); }
.status-danger { color: var(--jtd-status-danger-text); }
.status-info { color: var(--jtd-status-info-text); }
.status-neutral { color: var(--jtd-status-neutral-text); }

/* Shared Bootstrap confirmation dialog. */
.jtd-confirm-modal .modal-content { border: 1px solid #dee2e6; border-radius: .85rem; box-shadow: 0 1rem 3rem rgba(33, 37, 41, .18); }
.jtd-confirm-modal .modal-header, .jtd-confirm-modal .modal-footer { border-color: #edf0f2; padding: 1rem 1.25rem; }
.jtd-confirm-modal .modal-title { color: #212529; font-weight: 700; }
.jtd-confirm-modal .modal-body { color: #343a40; padding: 1.25rem; line-height: 1.55; }
/* Override legacy utility classes that used white text inside data grids. Solid action buttons and semantic status badges retain their intended contrast. */
.table tbody td .text-white:not(.badge):not(.btn),
.table tbody td.text-white:not(.badge):not(.btn),
table.dataTable tbody td .text-white:not(.badge):not(.btn),
table.dataTable tbody td.text-white:not(.badge):not(.btn) {
    color: #343a40 !important;
}
.table tbody td .text-bg-success, .table tbody td .text-bg-warning,
.table tbody td .text-bg-danger, .table tbody td .text-bg-info,
.table tbody td .text-bg-primary, .table tbody td .text-bg-secondary,
table.dataTable tbody td .text-bg-success, table.dataTable tbody td .text-bg-warning,
table.dataTable tbody td .text-bg-danger, table.dataTable tbody td .text-bg-info,
table.dataTable tbody td .text-bg-primary, table.dataTable tbody td .text-bg-secondary {
    color: inherit;
}
