/* DataTables custom light theme overrides */
.dt-container { color: #1f2937; }
.dt-fit-container {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}
.dt-fit-container .dt-container {
    width: max-content;
    max-width: 100%;
}
.dt-fit-container .overflow-x-auto {
    max-width: 100%;
}
.dt-fit-container table.dt-table {
    width: max-content !important;
}
.dt-density-tight.dataTable thead th,
.dt-density-tight.dataTable tbody td {
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
}
.dt-density-tight.dataTable tbody td {
    padding-top: 0.125rem !important;
    padding-bottom: 0.125rem !important;
}
.dt-density-tight.dataTable thead tr:nth-child(2) input {
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
}
.dt-search input, .dt-length select {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
    padding: 0.25rem 0.75rem !important;
}
.dt-paging a {
    border-radius: 0.375rem !important;
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
    margin-right: 0.25rem !important;
    padding: 0.25rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}
.dt-paging a:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}
.dt-paging a.current,
.dt-paging a[aria-current="page"] {
    background-color: #10b981 !important;
    color: #fff !important;
    border-color: #10b981 !important;
}

/* Remove horizontal lines after header and search bar */
.dt-container .dt-layout-row {
    border-bottom: none !important;
}
table.dt-table thead tr,
table.dt-table thead tr.border-b,
.dt-container table thead tr {
    border-bottom-width: 0 !important;
    border-bottom-style: none !important;
}

/* Compact row heights */
table.dt-table thead th {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    background-color: #f9fafb !important;
    color: #374151 !important;
}
table.dt-table thead tr:nth-child(2) th {
    padding-top: 0.15rem !important;
    padding-bottom: 0.35rem !important;
}
table.dt-table thead tr:nth-child(2) input {
    padding: 0.15rem 0.5rem !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #1f2937 !important;
}
table.dt-table tbody td {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}
table.dt-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}
table.dt-table tbody tr:nth-child(even) {
    background-color: #f9fafb !important;
}
table.dt-table tbody tr:hover {
    background-color: #f3f4f6 !important;
}

/* Table links - emerald on hover */
table.dt-table tbody a {
    color: #1f2937;
}
table.dt-table tbody a:hover {
    color: #059669 !important;
}

/* Select2 styling moved to static/css/select2-custom.css */

/* Table action buttons */
.btnc {
    padding: 2px 4px; 
    font-size: 0.8rem;
    border: 1px solid #aaa;
    background: transparent;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
table.dt-table tbody a.btnc:hover {
    background: #333;
    color: #fff !important;
    border-color: #333;
    text-decoration: none !important;
}
table.dt-table tbody a.btnc-clicked,
table.dt-table tbody a.btnc-clicked:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff !important;
}
