/* Global Styles - Updated with brand colors */
:root {
    /* Main brand colors - Exact brand palette */
    --primary-color: #EF5A29;       /* Primary orange */
    --secondary-color: #052730;     /* Dark teal */
    --accent-color: #CD623E;        /* Accent orange-brown */
    --text-color: #545454;          /* Text gray */
    
    /* Utility colors */
    --success-color: #2ecc71;
    --warning-color: #e74c3c;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
}

.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Form Validation */
.form-select.is-invalid {
    border-color: var(--warning-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-select.is-invalid:focus {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
}

.form-control.is-invalid {
    border-color: var(--warning-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--warning-color);
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Make sure invalid feedback messages appear properly */
.invalid-feedback {
    display: none;
    color: var(--warning-color);
    font-size: 80%;
    margin-top: 0.25rem;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.custom-navbar {
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 0.8rem 0;
    border-radius: 0 0 10px 10px;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: white !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.brand-text {
    background: linear-gradient(45deg, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
    margin-right: 5px;
}

.logo-img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .logo-img {
        height: 32px;
    }
}

.custom-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.custom-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.6rem 1rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(239, 90, 41, 0.15);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(239, 90, 41, 0.15);
    color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(1);
    transform-origin: bottom right;
}

.user-greeting {
    color: #ffffff;
    font-weight: 500;
    background-color: rgba(239, 90, 41, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(239, 90, 41, 0.3);
}

.user-info {
    position: relative;
}

.btn-logout {
    background-color: rgba(205, 98, 62, 0.9);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-login {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #ff6b39;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 90, 41, 0.3);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding-bottom: 2rem;
    margin-top: 80px;
}

/* Form Container */
.form-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.form-control {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 8px;
}

/* Button Styles */
.btn-primary {
    background-color: var(--secondary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Input Group */
.input-group-text {
    background-color: var(--secondary-color);
    color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 5px 0 0 5px;
}

/* Select Styles */
.form-select {
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Table Styles */
.table-container {
    margin: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(5, 39, 48, 0.08);
    border: 1px solid rgba(5, 39, 48, 0.05);
    overflow: hidden;
}

.dataTables_wrapper {
    padding: 20px;
}

.table {
    margin-bottom: 0;
    border: none;
}

.table thead th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table tbody td {
    vertical-align: middle;
    padding: 15px;
    border-color: rgba(5, 39, 48, 0.08);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        margin: 20px;
        padding: 20px;
    }

    .table-container {
        margin: 20px;
    }

    .table-responsive {
        overflow-x: auto;
    }
}

/* Success Message */
.success-message {
    background-color: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
    display: none;
}

/* Success Modal Styling */
#successModal .modal-content {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#successModal .modal-header {
    border-bottom: none;
}

#successModal .fa-check-circle {
    color: var(--success-color);
    font-size: 4rem;
    margin-bottom: 1rem;
}

#successModal .modal-footer {
    border-top: none;
    justify-content: center;
}

#successModal .btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    padding: 0.6rem 2rem;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-spinner i {
    color: var(--secondary-color);
    font-size: 3rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-bg);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 1000;
}

/* Footer Styles */
.footer {
    background-color: var(--light-bg);
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    bottom: 0;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-left, .footer-right {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Visitors Page Styles */
.table-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(5, 39, 48, 0.08);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(5, 39, 48, 0.05);
    overflow: hidden;
}

.table-container h2 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.table-container h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
}

/* Table Styles */
.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/* Common table head styling for all pages */
.table thead th {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border: none;
    position: relative;
    border-bottom: 2px solid rgba(5, 39, 48, 0.2);
}

/* When using the striped version */
.table-striped thead th {
    background-color: var(--light-bg);
}

.table thead th:first-child {
    border-top-left-radius: 4px;
}

.table thead th:last-child {
    border-top-right-radius: 4px;
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid rgba(5, 39, 48, 0.1);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover td {
    background-color: rgba(239, 90, 41, 0.03);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(5, 39, 48, 0.02);
}

.table-striped > tbody > tr:hover > * {
    background-color: rgba(239, 90, 41, 0.05);
}

/* Table Action Buttons */
.btn-group .btn-sm {
    padding: 0.25rem 0.5rem;
    margin: 0 0.15rem;
}

/* Export and Action Buttons */
.btn-outline-success {
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: white;
}

/* Standard button spacing in tables */
.table .btn-sm {
    margin-right: 0.25rem;
}

/* Table badge styling */
.table .badge {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

/* Actions column styling */
.actions-cell {
    min-width: 120px;
}

.btn-outline-danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

/* Action Buttons in Tables */
.btn-table-action {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-view {
    background-color: rgba(5, 39, 48, 0.1);
    color: var(--secondary-color);
    border: none;
}

.btn-view:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-edit {
    background-color: rgba(239, 90, 41, 0.1);
    color: var(--primary-color);
    border: none;
}

.btn-edit:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-delete {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: none;
}

.btn-delete:hover {
    background-color: var(--danger-color);
    color: white;
}

/* DataTables Custom Styles */
.dataTables_wrapper {
    padding: 1.5rem 0 1rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 0.5rem 0 1rem;
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(5, 39, 48, 0.2);
    border-radius: 6px;
    width: 70px !important;
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: rgba(239, 90, 41, 0.03);
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(239, 90, 41, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(5, 39, 48, 0.2);
    border-radius: 6px;
    width: 250px;
    transition: all 0.2s ease;
    background-color: rgba(239, 90, 41, 0.03);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(239, 90, 41, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    font-weight: 500;
    color: var(--secondary-color);
}

.dataTables_wrapper .dataTables_info {
    margin-top: 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modern Pagination Design - Complete Redesign */

/* DataTables Container Layout */
.dataTables_wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Top controls layout */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
    z-index: 2;
}

/* Bottom controls layout */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1.5rem;
    z-index: 2;
}

/* Unified Controls Container */
.unified-controls {
    position: relative;
    padding: 0 0 0.5rem;
    margin-top: 1.5rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Decorative bar at the bottom of the controls */
.controls-bar {
    position: absolute;
    height: 4px;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
}

/* DataTables pagination wrapper */
.dataTables_wrapper .dataTables_paginate {
    text-align: right;
    margin: 0;
    padding: 0.4rem 0.8rem;
    float: none !important;
    display: inline-flex;
    background-color: white;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(5, 39, 48, 0.08);
    border: 1px solid rgba(5, 39, 48, 0.06);
    position: relative;
}

/* Reset pagination list */
.dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

/* Modern Button Style for all pagination buttons */
.dataTables_wrapper .paginate_button,
.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button.disabled {
    padding: 0 !important;
    margin: 0 0.15rem !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    position: relative;
    border-radius: 50% !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* The a tag inside pagination buttons */
.dataTables_wrapper .paginate_button a,
.dataTables_wrapper .paginate_button.current a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    color: var(--secondary-color) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    background: transparent !important;
    position: relative !important;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hover effect */
.dataTables_wrapper .paginate_button:not(.disabled):not(.current):hover {
    transform: translateY(0) !important;
    background: rgba(239, 90, 41, 0.06) !important;
}

.dataTables_wrapper .paginate_button:not(.disabled):not(.current):hover a {
    color: var(--primary-color) !important;
}

/* Active/Current page */
.dataTables_wrapper .paginate_button.current {
    background-color: var(--primary-color) !important;
    z-index: 1 !important;
}

.dataTables_wrapper .paginate_button.current a {
    color: white !important;
    font-weight: 600 !important;
}

/* Previous/Next buttons special styling with icons */
.dataTables_wrapper .paginate_button.previous,
.dataTables_wrapper .paginate_button.next {
    margin: 0 0.3rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dataTables_wrapper .paginate_button.previous,
.dataTables_wrapper .paginate_button.next {
    background-color: var(--secondary-color) !important;
    color: white !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    font-size: 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dataTables_wrapper .paginate_button.previous i,
.dataTables_wrapper .paginate_button.next i {
    color: white !important;
}

.dataTables_wrapper .paginate_button.previous:not(.disabled):hover,
.dataTables_wrapper .paginate_button.next:not(.disabled):hover {
    background-color: var(--primary-color) !important;
    transform: scale(1.05);
}

.dataTables_wrapper .paginate_button.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Disabled state */
.dataTables_wrapper .paginate_button.disabled {
    opacity: 0.5 !important;
}

.dataTables_wrapper .paginate_button.disabled a {
    color: #aaa !important;
    cursor: not-allowed !important;
}

/* Ellipsis styling */
.dataTables_wrapper .ellipsis {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
}

/* Disabled State (Previous/Next when not available) */
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.disabled {
    color: #9aa0a6 !important;
    border-color: #e0e0e0;
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.disabled a {
    color: #9aa0a6 !important;
    cursor: not-allowed;
}

/* Previous/Next Buttons */
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.previous,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.next {
    font-weight: 600;
}

/* Bootstrap 5 DataTables Pagination Styles */
.page-item .page-link {
    color: var(--secondary-color);
    background-color: #fff;
    border: 1px solid rgba(5, 39, 48, 0.15);
    padding: 0.5rem 0.85rem;
    margin: 0 2px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.page-item .page-link:hover {
    color: var(--primary-color);
    background-color: rgba(239, 90, 41, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    z-index: 2;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(239, 90, 41, 0.25);
}

.page-item.disabled .page-link {
    color: #9aa0a6;
    pointer-events: none;
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}

/* DataTables Bootstrap 5 specific styling */
.dataTables_wrapper .dataTables_info {
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(5, 39, 48, 0.08);
    border: 1px solid rgba(5, 39, 48, 0.06);
    margin: 0;
}

/* Length selector styling - Redesigned to match pagination */
.dataTables_wrapper .dataTables_length {
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    box-shadow: 0 4px 12px rgba(5, 39, 48, 0.08);
    border: 1px solid rgba(5, 39, 48, 0.06);
}

.dataTables_wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_length select {
    background-color: white;
    border: 1px solid rgba(5, 39, 48, 0.15);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    margin: 0 0.5rem;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23052730' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 16px 12px;
    padding-right: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--secondary-color);
    min-width: 80px;
    text-align: center;
}

.dataTables_wrapper .dataTables_length select:hover,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(239, 90, 41, 0.1);
}

/* Search field styling - Redesigned to match pagination */
.dataTables_wrapper .dataTables_filter {
    background: white;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    box-shadow: 0 4px 12px rgba(5, 39, 48, 0.08);
    border: 1px solid rgba(5, 39, 48, 0.06);
    width: 290px;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid rgba(5, 39, 48, 0.15);
    border-radius: 20px;
    padding: 0.4rem 1rem 0.4rem 2.2rem;
    margin-left: 0.5rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23052730' d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.7rem center;
    background-size: 16px 16px;
    transition: all 0.2s ease;
    width: 160px !important;
}

.dataTables_wrapper .dataTables_filter input:hover,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(239, 90, 41, 0.1);
    outline: none;
}

/* Container layout styles */
.dataTables_top-controls,
.dataTables_bottom-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dataTables_top-controls {
    margin-bottom: 1.5rem;
}

.dataTables_bottom-controls {
    margin-top: 1.5rem;
}

/* Mobile responsiveness for pagination and controls */
@media (max-width: 767px) {
    .dataTables_wrapper .dataTables_paginate {
        width: 100%;
        white-space: nowrap;
        overflow-x: auto;
        /* Smooth scrolling for touch devices */
        overflow-x: auto;
        display: block;
        text-align: center;
        margin-top: 1rem;
    }
    
    .pagination-container {
        overflow: hidden;
    }
    
    .dataTables_top-controls,
    .dataTables_bottom-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info {
        margin-bottom: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .dataTables_wrapper .dataTables_filter {
        margin-top: 0.5rem;
    }
}

/* Responsive Table Styles */
@media (max-width: 768px) {
    .table-container {
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        padding: 1rem;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .table thead th {
        padding: 0.75rem;
    }

    .table tbody td {
        padding: 0.75rem;
    }
}

/* Card Styles for Filters and Tables */
.card {
    border: 1px solid rgba(5, 39, 48, 0.1);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(5, 39, 48, 0.05);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: rgba(5, 39, 48, 0.03);
    border-bottom: 1px solid rgba(5, 39, 48, 0.1);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background-color: var(--secondary-color) !important;
    color: white;
    display: flex;
    align-items: center;
}

.card-header.bg-primary i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.25rem;
}

/* High-specificity Overrides for Bootstrap 5 DataTables Pagination */
.table-responsive div.dataTables_wrapper div.dataTables_paginate ul.pagination li a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li a.page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-weight: 500 !important;
    margin: 0 0.15rem !important;
    color: var(--secondary-color) !important;
    background-color: transparent !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.table-responsive div.dataTables_wrapper div.dataTables_paginate ul.pagination li:not(.disabled):not(.active):hover a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li:not(.disabled):not(.active):hover a.page-link {
    background-color: rgba(239, 90, 41, 0.06) !important;
    color: var(--primary-color) !important;
    transform: none !important;
}

.table-responsive div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a.page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.active a.page-link {
    background-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(239, 90, 41, 0.3) !important;
}

/* Force all pagination containers to be centered properly */
.dataTables_wrapper .dataTables_paginate,
div.dataTables_wrapper div.dataTables_paginate {
    float: none !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0.4rem !important;
    display: inline-flex !important;
    justify-content: center !important;
}

/* DataTables Bootstrap 5 specific overrides */
.dataTables_wrapper div.row:first-child {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.dataTables_wrapper div.row:last-child {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
}

/* Fixed double padding issue */
.dataTables_wrapper {
    padding: 0 !important;
}
