/* Page Header */
.page-header-section {
    border-radius: 12px;
}

.page-title {
    color: black;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.page-subtitle {
    color: rgba(6, 1, 1, 0.9);
    margin: 5px 0 0 0;
    font-size: 13px;
}

/* Separate Search Header - Like Image */
.search-header-bar {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #dee2e6;
    border-bottom: none;
    margin-bottom: 0;
}

.search-header-bar h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search Filter Card - No top radius */
.search-filter-card {
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-top: none;
}

/* Filter Form */
.filter-form-wrapper {
    padding: 20px;
    background: white;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.modern-input {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

.modern-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Buttons */
.btn-custom {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.btn-secondary-custom:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-2px);
}

.btn-success-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success-custom:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.record-count {
    font-size: 12px;
    color: #64748b;
    padding: 5px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.record-count strong {
    color: #2563eb;
    font-weight: 700;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-name-text {
    font-weight: 600;
    color: #1e293b;
}

/* Badges */
.badge-custom {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-badge-admin {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.role-badge-comptroller {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.role-badge-maker {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.role-badge-checker {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.role-badge-viewer {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
}

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action-edit {
    background: #dcfce7;
    color: #16a34a;
}

.btn-action-edit:hover {
    background: #16a34a;
    color: white;
    transform: scale(1.1);
}

.btn-action-view {
    background: #dbeafe;
    color: #2563eb;
}

.btn-action-view:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.1);
}

.btn-action-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-action-delete:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* DataTables Custom Styling for Bootstrap 5 */
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}

table.dataTable thead th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    padding: 14px 12px;
    font-size: 13px;
    border-bottom: 2px solid #e2e8f0;
}

table.dataTable tbody td {
    padding: 12px;
    vertical-align: middle;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

table.dataTable tbody tr:hover {
    background: #f8fafc;
}

/* DataTables Wrapper Elements */
.dataTables_wrapper {
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_length {
    padding: 15px 20px 10px 20px;
    float: left;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 5px 10px;
    margin: 0 5px;
}

.dataTables_wrapper .dataTables_filter {
    padding: 15px 20px 10px 20px;
    float: right;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 5px 10px;
    margin-left: 5px;
}

.dataTables_wrapper .dataTables_info {
    padding: 15px 20px;
    float: left;
    color: #6c757d;
    font-size: 14px;
}

/* Pagination Styling - MAIN FIX */
.dataTables_wrapper .dataTables_paginate {
    padding: 15px 20px;
    float: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #495057 !important;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: white !important;
    border-color: #2563eb !important;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: white;
    border-color: #dee2e6;
}

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

/* Clear floats */
.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}