/* Shared QuickGrid theme. Keep all interaction in Blazor. */
.table-card {
    --table-ink: #24344b;
    --table-muted: #52637a;
    --table-border: #dce3ec;
    border: 1px solid var(--table-border);
    border-radius: .85rem;
    box-shadow: 0 3px 14px rgb(25 48 78 / 5%);
    color: var(--table-ink);
    margin-bottom: 1.25rem;
}
.table-card > .card-header {
    padding: 1.1rem 1.4rem;
    background: #fff;
    color: #24344b;
    border-bottom: 1px solid var(--table-border);
    border-radius: .85rem .85rem 0 0;
    font-size: 1.15rem;
    font-weight: 600;
}
.table-card > .card-body { padding: 1.4rem; }
.table-filters {
    display: flex;
    gap: .85rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f5f7fb;
    border: 1px solid #dce3ec;
    border-radius: .7rem;
}
.table-filters > div { flex: 1 1 10rem; width: auto; padding: 0; margin: 0; }
.table-filters > div:first-child { flex: 2 1 20rem; }
.table-filters > div:last-child { flex: 0 1 auto; }
.table-filters .form-label { color: #33445c; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; }
.table-filters .form-control, .table-filters .form-select { min-height: 2.75rem; border-color: #aebdce; border-radius: .45rem; }
.table-filters .form-control::placeholder { color: #5b6c81; opacity: 1; }
.table-filters .btn { min-height: 2.75rem; white-space: nowrap; }
.table-search { position: relative; }
.table-search > .bi { position: absolute; left: .85rem; top: .7rem; color: #52637a; pointer-events: none; }
.table-search > input { padding-left: 2.5rem; }

.data-table { border: 1px solid #dce3ec; border-radius: .7rem; background: #fff; }
.data-table-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .9rem 1rem; color: #52637a; font-size: .875rem; }
.data-table-summary strong { color: #24344b; }
.data-table-hint { font-size: .8rem; }
.data-table-scroll { overflow-x: auto; border-block: 1px solid #dce3ec; }
.xpa-table { width: 100%; border-collapse: collapse; font-size: .9rem; color: #24344b; }
.xpa-table th { background: #f3f6fa; color: #33445c; font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid #dce3ec; }
.xpa-table th, .xpa-table td { padding: .85rem 1rem; vertical-align: middle; }
.xpa-table tbody tr[aria-rowindex] + tr[aria-rowindex] { border-top: 1px solid #e7ecf2; }
.xpa-table tbody tr[aria-rowindex]:nth-child(even) { background: #fafbfd; }
.xpa-table tbody tr[aria-rowindex]:hover, .xpa-table tbody tr[aria-rowindex]:focus-within { background: #edf4fd; }
/* .NET 10 adds padding rows; hide only those rows, never real rows with empty values. */
.xpa-table tbody tr:not([aria-rowindex]) { display: none; }
.xpa-table .col-header-content, .xpa-table .col-title { display: flex; align-items: center; gap: .5rem; }
.xpa-table .col-title { font: inherit; color: inherit; }
.xpa-table button.col-title { width: 100%; background: transparent; border: 0; padding: .35rem 0; text-align: left; border-radius: .2rem; min-height: 2rem; }
.xpa-table button.col-title:hover { color: #0054ad; }
.xpa-table th[aria-sort="ascending"], .xpa-table th[aria-sort="descending"] { color: #004a99; background: #e8f1fd; }
.xpa-table .sort-indicator { display: inline-block; width: 1rem; height: 1rem; flex: 0 0 1rem; }
.xpa-table .sort-indicator::before { font-family: bootstrap-icons !important; content: "\f127"; font-weight: normal; }
.xpa-table th[aria-sort="ascending"] .sort-indicator::before { content: "\f148"; }
.xpa-table th[aria-sort="descending"] .sort-indicator::before { content: "\f128"; }
.xpa-table a:not(.btn) { color: #0054ad; text-underline-offset: .15em; }
.xpa-table .table-actions { min-width: 8rem; }
.table-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.xpa-table .btn { font-size: .8rem; border-radius: .4rem; min-height: 2.5rem; padding: .45rem .75rem; white-space: nowrap; }
.xpa-table .btn-danger { color: #a41e30; background: #fff; border-color: #bb4250; }
.xpa-table .btn-danger:hover { background: #a41e30; color: #fff; }
.xpa-table .btn-info { background: #fff; color: #005c72; border-color: #258096; }
.xpa-table .btn-info:hover { background: #005c72; color: #fff; }
.xpa-table .btn-success { background: #fff; color: #176440; border-color: #318057; }
.xpa-table .btn-success:hover { background: #176440; color: #fff; }
.xpa-table .btn-warning { color: #6a4800; background: #fff8df; border-color: #947020; }
.xpa-table .btn-warning:hover { color: #fff; background: #6a4800; }

.status-badge { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .65rem; border-radius: 2rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status-badge::before { content: ""; width: .4rem; height: .4rem; background: currentColor; border-radius: 50%; }
.status-new { color: #795000; background: #fff3cd; }
.status-approved { color: #004a99; background: #e5efff; }
.status-positive { color: #16613d; background: #e5f4eb; }
.status-negative { color: #a41e30; background: #fdebed; }
.status-neutral { color: #4d5c70; background: #eef1f5; }
.data-table-empty { display: flex; align-items: center; flex-direction: column; gap: .5rem; padding: 2.75rem 1rem; text-align: center; color: #52637a; }
.data-table-empty > .bi { font-size: 1.75rem; color: #52637a; }
.data-table-empty > strong { color: #24344b; font-size: 1rem; }
.data-table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; color: #52637a; font-size: .85rem; }
.data-table-page-size, .data-table-pagination { display: flex; align-items: center; gap: .5rem; }
.data-table-page-size .form-select { width: 5rem; min-height: 2.5rem; color: #24344b; border-color: #aebdce; font-size: .85rem; }
.data-table-pagination .btn { min-width: 2.5rem; min-height: 2.5rem; padding: .45rem; border-color: #aebdce; color: #33445c; }
.data-table-pagination .btn:hover:not(:disabled) { background: #e8f1fd; color: #004a99; }
.data-table-pagination .btn:disabled { opacity: .45; }
.data-table-page-number { padding-inline: .35rem; color: #24344b; white-space: nowrap; }
.data-table-range { font-variant-numeric: tabular-nums; }
.table-card :is(button, a, input, select):focus-visible, .data-table :is(button, a, select):focus-visible, .data-table-scroll:focus-visible { outline: 3px solid #0054ad; outline-offset: 3px; box-shadow: none; }
.table-details { font-size: .95rem; border-color: #dce3ec; }
.table-details th[scope="row"] { background: #f3f6fa; color: #33445c; font-weight: 600; width: 30%; }
.table-details th, .table-details td { padding: .85rem 1rem; overflow-wrap: anywhere; }
.table-details caption { color: #52637a; }
@media (max-width: 767px) {
    .table-card > .card-body { padding: .8rem; }
    .table-card > .card-header { padding: 1rem; }
    .table-filters { padding: .8rem; }
    .table-filters > div:last-child { flex: 1 1 100%; }
    .data-table-footer { justify-content: center; gap: .75rem; }
    .data-table-pagination { justify-content: center; flex: 1 1 100%; }
    .data-table-hint { width: 100%; }
    .table-details th, .table-details td { padding: .65rem; }
}
@media (forced-colors: active) {
    .status-badge, .data-table { border: 1px solid CanvasText; }
    .table-card :is(button, a, input, select):focus-visible, .data-table :is(button, a, select):focus-visible, .data-table-scroll:focus-visible { outline-color: Highlight; }
}
