input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 1; cursor: pointer; }
input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 1; cursor: pointer; }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

.dt-layout-row:has(.dt-search),
.dt-layout-row:has(.dt-length),
.dt-layout-row:has(.dt-paging),
.dt-scroll-body thead {
    display: none !important;
}

.dt-container table thead th {
    background-color: rgb(var(--layer));
    color: rgb(var(--muted-foreground-1));
    border-bottom: 1px solid rgb(var(--table-line));
}

.dt-container table tbody tr {
    background-color: transparent;
}

.dt-container table tbody tr:hover {
    background-color: rgb(var(--muted-hover) / 0.3);
}

.dt-container table tbody td {
    border-bottom: 1px solid rgb(var(--table-line));
    color: rgb(var(--foreground));
}

.dt-container .dt-paging-button {
    background-color: transparent;
    color: rgb(var(--foreground));
    border: 1px solid rgb(var(--table-line));
}

.dt-container .dt-paging-button:hover {
    background-color: rgb(var(--muted-hover));
    border-color: rgb(var(--table-line));
}

.dt-container .dt-paging-button.current {
    background-color: rgb(var(--muted-active));
    border-color: rgb(var(--table-line));
}

.dt-container .dt-paging-button.disabled {
    opacity: 0.5;
}

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

table.dataTable thead th,
table.dataTable tbody td {
    box-sizing: border-box;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: rgb(var(--muted-foreground));
    border: 2px solid rgb(var(--muted-hover));
    border-radius: 9999px;
    box-shadow: none;
    color: #fff;
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    height: 1.5rem;
    line-height: 1.25rem;
    margin-right: 0.65rem;
    text-align: center;
    vertical-align: middle;
    width: 1.5rem;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    background-color: rgb(var(--primary));
    border-color: rgb(var(--primary-hover));
}

table.dataTable > tbody > tr.child {
    background-color: rgb(var(--layer));
    border-bottom: 1px solid rgb(var(--table-line));
}

table.dataTable > tbody > tr.child > td.child {
    padding: 0.75rem 1.25rem !important;
}

table.dataTable > tbody > tr.child ul.dtr-details {
    margin: 0;
    padding: 0;
    width: 100%;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    border-bottom: 1px solid rgb(var(--table-line) / 0.5);
    padding: 0.625rem 0.5rem;
}

table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
    border-bottom: none;
}

table.dataTable > tbody > tr.child span.dtr-title {
    color: rgb(var(--muted-foreground-1));
    font-weight: 500;
    padding-right: 0.75rem;
}

table.dataTable > tbody > tr.child span.dtr-data {
    color: rgb(var(--foreground));
    overflow-wrap: anywhere;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.status-draft { background-color: rgb(82 82 91 / 0.6); color: rgb(209 213 219); }
.status-sent { background-color: rgb(59 130 246 / 0.1); color: rgb(96 165 250); }
.status-accepted { background-color: rgb(34 197 94 / 0.1); color: rgb(74 222 128); }
.status-rejected { background-color: rgb(239 68 68 / 0.1); color: rgb(248 113 113); }
.status-expired { background-color: rgb(234 179 8 / 0.1); color: rgb(251 191 36); }

.action-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.view-btn {
    color: rgb(156 163 175);
    background-color: rgb(30 30 32 / 0.6);
    border: 1px solid rgb(51 51 51 / 0.6);
}

.view-btn:hover {
    color: white;
    background-color: rgb(55 55 65 / 0.6);
}

.edit-btn {
    color: rgb(96 165 250);
    background-color: rgb(59 130 246 / 0.15);
    border: 1px solid rgb(59 130 246 / 0.3);
    cursor: pointer;
}

.edit-btn:hover {
    color: rgb(147 197 253);
    background-color: rgb(59 130 246 / 0.25);
    border-color: rgb(59 130 246 / 0.5);
}

.delete-btn {
    color: rgb(248 113 113);
    background-color: rgb(239 68 68 / 0.1);
    border: none;
    cursor: pointer;
}

.delete-btn:hover {
    color: rgb(254 114 114);
    background-color: rgb(239 68 68 / 0.2);
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

/* Locally styled legacy module markup, using Nilnet's dark-neutral palette. */
body.ported-module {
    min-height: 100vh;
    background: #0a0a0a;
    color: #e5e5e5;
}

.ported-module #wrapper { display: flex; min-height: 100vh; overflow-x: hidden; }
.ported-module #content-wrapper { display: flex; flex: 1; min-width: 0; flex-direction: column; background: #0a0a0a; }
.ported-module #content { flex: 1; min-width: 0; }
.ported-module .container-fluid { width: min(100%, 1440px); margin: 0 auto; padding: 1.5rem; }
.ported-module .bg-dark, .ported-module .bg-dark-card { background-color: #0a0a0a !important; }
.ported-module .card { overflow: hidden; color: #e5e5e5; background: #171717; border: 1px solid #262626; border-radius: .75rem; }
.ported-module .card-header { padding: 1rem 1.5rem; color: #f5f5f5; background: #171717; border-bottom: 1px solid #262626; }
.ported-module .card-body { padding: 1.5rem; }
.ported-module .breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: .75rem 1rem; list-style: none; color: #d4d4d4; background: #171717; border: 1px solid #262626; border-radius: .75rem; }
.ported-module .breadcrumb-item + .breadcrumb-item::before { padding-right: .5rem; color: #737373; content: "/"; }
.ported-module .breadcrumb-item a { color: #d4d4d4; }
.ported-module .breadcrumb-item a:hover { color: #fff; }
.ported-module .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.ported-module [class^="col-"], .ported-module [class*=" col-"] { min-width: 0; grid-column: span 12 / span 12; }
.ported-module .form-group { min-width: 0; margin-bottom: 1rem; }
.ported-module label { display: block; margin-bottom: .375rem; color: #d4d4d4; font-size: .875rem; }
.ported-module .form-control, .ported-module select.form-control, .ported-module textarea.form-control {
    display: block; width: 100%; min-height: 2.5rem; padding: .5rem .75rem; color: #f5f5f5;
    background: #262626; border: 1px solid #404040; border-radius: .5rem; font: inherit;
}
.ported-module .form-control:focus { border-color: #737373; outline: 2px solid rgb(163 163 163 / 20%); outline-offset: 0; }
.ported-module .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem .875rem; border: 1px solid transparent; border-radius: .5rem; font-size: .875rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.ported-module .btn-sm { padding: .375rem .625rem; font-size: .8125rem; }
.ported-module .btn-light, .ported-module .btn-primary, .ported-module .btn-info { color: #f5f5f5; background: #404040; border-color: #525252; }
.ported-module .btn-light:hover, .ported-module .btn-primary:hover, .ported-module .btn-info:hover { color: #fff; background: #525252; }
.ported-module .btn-secondary { color: #d4d4d4; background: #262626; border-color: #404040; }
.ported-module .btn-danger { color: #fca5a5; background: rgb(239 68 68 / 10%); border-color: rgb(239 68 68 / 25%); }
.ported-module .btn-success { color: #86efac; background: rgb(34 197 94 / 10%); border-color: rgb(34 197 94 / 25%); }
.ported-module .text-light, .ported-module .text-white { color: #f5f5f5 !important; }
.ported-module .text-muted { color: #a3a3a3 !important; }
.ported-module .text-danger { color: #fca5a5 !important; }
.ported-module .table { width: 100%; border-collapse: collapse; color: #e5e5e5; }
.ported-module .table th, .ported-module .table td { padding: .75rem; border-bottom: 1px solid #333; text-align: left; vertical-align: middle; }
.ported-module .table thead th { color: #a3a3a3; background: #171717; font-weight: 600; }
.ported-module .table-striped tbody tr:nth-child(odd) { background: rgb(38 38 38 / 35%); }
.ported-module .table-bordered th, .ported-module .table-bordered td { border: 1px solid #333; }
.ported-module .badge { display: inline-flex; align-items: center; padding: .25rem .55rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.ported-module .badge-success { color: #86efac; background: rgb(34 197 94 / 12%); }
.ported-module .badge-danger { color: #fca5a5; background: rgb(239 68 68 / 12%); }
.ported-module .badge-warning { color: #fde68a; background: rgb(234 179 8 / 12%); }
.ported-module .badge-secondary { color: #d4d4d4; background: #404040; }
.ported-module .select2-container--default .select2-selection--single,
.ported-module .select2-container--default .select2-selection--multiple,
.ported-module .select2-dropdown { color: #f5f5f5; background: #262626; border-color: #404040; }
.ported-module .select2-container--default .select2-selection--single .select2-selection__rendered { color: #f5f5f5; }
.ported-module .select2-container--default .select2-results__option--highlighted[aria-selected] { color: #fff; background: #404040; }

@media (min-width: 768px) {
    .ported-module .col-md-2 { grid-column: span 2 / span 2; }
    .ported-module .col-md-3 { grid-column: span 3 / span 3; }
    .ported-module .col-md-4 { grid-column: span 4 / span 4; }
    .ported-module .col-md-6 { grid-column: span 6 / span 6; }
    .ported-module .col-md-8 { grid-column: span 8 / span 8; }
    .ported-module .col-md-9 { grid-column: span 9 / span 9; }
    .ported-module .col-md-10 { grid-column: span 10 / span 10; }
}

@media (max-width: 767px) {
    .ported-module .container-fluid { padding: 1rem; }
    .ported-module .card-header, .ported-module .card-body { padding: 1rem; }
    .ported-module .row { gap: .75rem; }
    .ported-module .table-responsive { width: 100%; overflow-x: auto; }
}

.select2-dropdown,
.select2-results {
    overflow: hidden !important;
}

.select2-results__options {
    max-height: 240px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--scrollbar-thumb)) rgb(var(--scrollbar-track));
}

.select2-container--tailwindcss-3 {
    font-size: 0.875rem;
}

.select2-container--tailwindcss-3 .select2-selection--single {
    background-color: rgb(var(--select));
    border-color: rgb(var(--select-line)) !important;
    border-radius: 0.5rem;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select2-container--tailwindcss-3.select2-container--open .select2-selection--single {
    border-color: rgb(var(--primary-focus)) !important;
}

.select2-container--tailwindcss-3 .select2-selection--single .select2-selection__rendered {
    color: rgb(var(--select-item-foreground));
}

.select2-container--tailwindcss-3 .select2-selection--single .select2-selection__placeholder {
    color: rgb(var(--muted-foreground)) !important;
}

.select2-container--tailwindcss-3 .select2-selection--single .select2-selection__arrow b {
    border-color: rgb(var(--muted-foreground)) transparent transparent transparent;
}

body:not(.ported-module) .select2-dropdown {
    background-color: rgb(var(--dropdown)) !important;
    border: 1px solid rgb(var(--dropdown-line)) !important;
    border-radius: 0.5rem;
}

body:not(.ported-module) .select2-results,
body:not(.ported-module) .select2-results__options {
    background-color: rgb(var(--dropdown)) !important;
    color: rgb(var(--dropdown-item-foreground));
}

body:not(.ported-module) .select2-results__option {
    color: rgb(var(--dropdown-item-foreground));
}

body:not(.ported-module) .select2-results__option:hover {
    background-color: rgb(var(--dropdown-item-hover)) !important;
}

.select2-container--tailwindcss-3 .select2-search--dropdown .select2-search__field {
    background-color: rgb(var(--select));
    border-color: rgb(var(--select-line));
    color: rgb(var(--foreground));
}

body:not(.ported-module) .select2-results__option--highlighted,
body:not(.ported-module) .select2-results__option--highlighted[aria-selected] {
    background-color: rgb(var(--primary)) !important;
    color: rgb(var(--layer-foreground)) !important;
}

body:not(.ported-module) .select2-results__option[aria-selected="true"] {
    background-color: rgb(var(--primary) / 0.15);
    color: rgb(var(--primary));
}

.select2-container--tailwindcss-3 .select2-selection--multiple {
    background-color: rgb(var(--select));
    border-color: rgb(var(--select-line));
    border-radius: 0.5rem;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select2-container--tailwindcss-3 .select2-selection--multiple .select2-selection__choice {
    background-color: rgb(var(--primary));
    border-color: rgb(var(--primary));
    color: rgb(var(--layer-foreground));
}

.select2-container--tailwindcss-3 .select2-selection--multiple .select2-selection__choice__remove {
    color: rgb(var(--layer-foreground));
}

.select2-container--tailwindcss-3 .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: rgb(var(--primary-hover));
    color: rgb(var(--layer-foreground));
}

.select2-container--tailwindcss-3 .select2-selection--multiple .select2-selection__choice__remove:focus {
    outline: none;
}

.select2-container--tailwindcss-3.select2-container--focus .select2-selection--single {
    border-color: rgb(var(--primary-focus)) !important;
    box-shadow: 0 0 0 1px rgb(var(--primary-focus) / 0.45) !important;
}

.select2-container--tailwindcss-3.select2-container--focus .select2-selection--multiple {
    border-color: rgb(var(--primary-focus)) !important;
    box-shadow: 0 0 0 1px rgb(var(--primary-focus) / 0.45) !important;
}

.select2-container--tailwindcss-3 .select2-search--dropdown .select2-search__field:focus {
    border-color: rgb(var(--primary-focus));
    box-shadow: 0 0 0 1px rgb(var(--primary-focus) / 0.45);
}

body:not(.ported-module) .select2-results__option--selected:after {
    color: rgb(var(--primary)) !important;
}

body:not(.ported-module) .select2-results__option--loading,
body:not(.ported-module) .select2-results__option--load-more,
body:not(.ported-module) .select2-results__option--message,
body:not(.ported-module) .select2-results__message,
body:not(.ported-module) .select2-no-results {
    color: rgb(var(--muted-foreground)) !important;
}

body:not(.ported-module) .select2-results__option--loading:after {
    border-top-color: rgb(var(--primary));
}

body:not(.ported-module) .select2-results__options::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body:not(.ported-module) .select2-results__options::-webkit-scrollbar-track {
    background: rgb(var(--scrollbar-track));
}

body:not(.ported-module) .select2-results__options::-webkit-scrollbar-thumb {
    background-color: rgb(var(--scrollbar-thumb));
    border-radius: 4px;
    border: 2px solid rgb(var(--scrollbar-track));
}
