table.dataTable {
    table-layout: fixed;
    width: 100% !important;
}

:root {
    --theme-bg: #e6e6e6;
    --theme-surface: #ffffff;
    --theme-border: #cfcfcf;
    --theme-text: #222;
    --theme-muted: #6c757d;
    --theme-link: #2f6db5;
    --theme-link-hover: #1f4f86;
    --theme-header: #2b2b2b;
    --theme-header-border: #111;
    --theme-accent: #2f6db5;
}

html, body {
    height: 100%;
}

body {
    background: var(--theme-bg);
    color: var(--theme-text);
}

a {
    color: var(--theme-link);
    text-decoration: none;
}

a:hover {
    color: var(--theme-link-hover);
    text-decoration: underline;
}

div.container{
    max-width: 90% !important;
}

.theme-navbar {
    background: var(--theme-header) !important;
    border-bottom: 1px solid var(--theme-header-border);
}

.theme-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: .2px;
}

.theme-navbar .navbar-brand,
.theme-navbar .navbar-brand:hover {
    color: #fff !important;
    text-decoration: none;
}

.theme-navbar .navbar-brand .theme-accent {
    color: var(--theme-accent);
}

.theme-navbar .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-size: .875rem;
    padding-top: .35rem;
    padding-bottom: .35rem;
}

.theme-navbar .nav-link:hover {
    color: #fff !important;
}

.theme-navbar .nav-link.active {
    color: #fff !important;
    position: relative;
}

.theme-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: -.35rem;
    height: 2px;
    background: var(--theme-accent);
}

.card {
    border-radius: 0 !important;
    border-color: var(--theme-border) !important;
}

.shadow-sm {
    box-shadow: none !important;
}

.card-header {
    border-radius: 0 !important;
    background: #f6f6f6;
}

.btn {
    border-radius: 0 !important;
}

.btn-primary {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}

.btn-primary:hover {
    background: var(--theme-link-hover);
    border-color: var(--theme-link-hover);
}

h1, .h1 { font-size: 1.25rem; }
h2, .h2 { font-size: 1.125rem; }
h3, .h3 { font-size: 1rem; }

.theme-page-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .1px;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--theme-border);
}

.table {
    font-size: .875rem;
}

.table > :not(caption) > * > * {
    padding: .35rem .5rem;
}

.table thead th {
    background: #f1f1f1;
    border-bottom-color: var(--theme-border) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #fbfbfb;
}

div.dataTables_wrapper .dataTables_length,
div.dataTables_wrapper .dataTables_filter,
div.dataTables_wrapper .dataTables_info,
div.dataTables_wrapper .dataTables_paginate {
    font-size: .875rem;
}

.page-link {
    border-radius: 0 !important;
    color: var(--theme-link);
}

.page-item.active .page-link {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}

.ts-control {
    min-height: calc(2.1rem + 2px);
    border-radius: 0 !important;
}

.ts-dropdown, .ts-control {
    font-size: .875rem;
}

.ts-dropdown .active {
    background: #eaf2ff;
}

.text-muted {
    color: var(--theme-muted) !important;
}

.dt-col-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card .form-label {
    font-weight: 600;
}

#filters-clear, #filters-clear-og {
    border-radius: 0;
}

body.modal-open .ts-dropdown {
    z-index: 20000 !important;
}

body.modal-open .ts-wrapper,
body.modal-open .ts-control {
    position: relative;
}

.psn-filters-style .form-label {
    font-size: .9rem;
    color: #495057;
}

.psn-filters-style .form-switch .form-check-label {
    font-size: .9rem;
}

div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input {
    border: 1px solid var(--theme-border);
    border-radius: 0 !important;
    padding-left: 7px;
    padding-right: 30px;
    height: 28px;
    font-size: .875rem;
}

div.dataTables_wrapper div.dataTables_filter input {
    width: 220px;
}

div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
    font-weight: 600;
    color: #333;
}

div.dataTables_wrapper .dataTables_info {
    color: var(--theme-muted);
}

table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
}

table.dataTable thead th {
    border-top: 1px solid var(--theme-border) !important;
    border-bottom: 1px solid var(--theme-border) !important;
    color: #333;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

table.dataTable tbody td {
    border-bottom: 1px solid #e7e7e7;
}

table.dataTable tbody tr:hover > * {
    background: #eef5ff !important;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    position: relative;
    padding-right: 1.4rem !important;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .75rem;
    color: #8a8a8a;
}

table.dataTable thead th.sorting::after { content: '⇅'; }
table.dataTable thead th.sorting_asc::after { content: '▲'; }
table.dataTable thead th.sorting_desc::after { content: '▼'; }

.pagination {
    margin: 0;
}

.page-link {
    padding: .2rem .45rem;
}

.dt-thumb {
    border: 1px solid #d8d8d8;
    background: #fff;
    vertical-align: middle;
    margin-right: .4rem;
}

.dt-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.dt-title-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-title-icons {
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--theme-muted);
}

.dt-title-icons img {
    vertical-align: text-bottom;
}

.dt-title-icons .bi {
    font-size: .95rem;
}

.badge,
.badge.rounded-pill {
    border-radius: 0 !important;
    font-size: .75rem;
    font-weight: 600;
    padding: .15rem .35rem;
    border: 1px solid var(--theme-border);
}

.text-bg-secondary {
    background: #efefef !important;
    color: #333 !important;
}

.text-bg-danger {
    background: #ffecec !important;
    color: #a61b1b !important;
    border-color: #f0bcbc !important;
}

.text-bg-light {
    background: #f6f6f6 !important;
    color: #333 !important;
}

.bi-exclamation-triangle-fill { color: #c9302c; }
.bi-trash { color: #6c757d; }
