/* Doxa Realty - Professional UI Styles */
/* Built with Tailwind CSS + Custom Overrides */

/* ========================================
   BASE STYLES
   ======================================== */

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #F9FAFB;
    color: #1F2937;
}

/* Page layout adjustment for fixed navbar */
#page_layout {
    padding-top: 4rem;
}

.main-content {
    margin-left: 0 !important;
    min-height: 100vh;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1F2937;
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #F59E0B !important;
    border-color: #F59E0B !important;
    color: white !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #D97706 !important;
    border-color: #D97706 !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.25);
}

.btn-secondary {
    background-color: #6B7280 !important;
    border-color: #6B7280 !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: #4B5563 !important;
    border-color: #4B5563 !important;
}

.btn-success {
    background-color: #10B981 !important;
    border-color: #10B981 !important;
}

.btn-danger {
    background-color: #EF4444 !important;
    border-color: #EF4444 !important;
}

.btn-outline-primary {
    color: #F59E0B !important;
    border-color: #F59E0B !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #F59E0B !important;
    color: white !important;
}

.btn-block {
    width: 100% !important;
}

/* ========================================
   FORMS
   ======================================== */

.form-control {
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-select {
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
}

.form-select:focus {
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* ========================================
   TABLES
   ======================================== */

.table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #F9FAFB;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #E5E7EB;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: #FFFBEB;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #F9FAFB;
}

/* ========================================
   MODALS
   ======================================== */

/* Ensure modals are hidden by default */
.modal {
    display: none !important;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.fade:not(.show) {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.modal-backdrop {
    display: none;
}

.modal-backdrop.show {
    display: block;
}

/* Modal Dialog - Centered */
.modal-dialog {
    margin: auto !important;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

.modal-dialog-centered {
    min-height: calc(100% - 1rem);
    display: flex;
    align-items: center;
}

/* Modal Content - Modern Design */
.modal-content {
    background-color: white !important;
    border-radius: 1rem !important;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

html.dark .modal-content,
.dark .modal-content {
    background-color: #1F2937 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

.modal-header {
    border-bottom: 1px solid #E5E7EB;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
    flex-shrink: 0;
}

html.dark .modal-header,
.dark .modal-header {
    border-bottom-color: #374151;
    background: linear-gradient(180deg, #1F2937 0%, #111827 100%);
}

.modal-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #1F2937;
}

html.dark .modal-title,
.dark .modal-title {
    color: #F9FAFB;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

html.dark .modal-body,
.dark .modal-body {
    color: #E5E7EB;
}

.modal-footer {
    border-top: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

html.dark .modal-footer,
.dark .modal-footer {
    background: linear-gradient(180deg, #111827 0%, #0F172A 100%);
    border-top-color: #374151;
}

/* Close Button */
.modal-header .btn-close,
.modal-header .close {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    opacity: 0.6;
}

.modal-header .btn-close:hover,
.modal-header .close:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

html.dark .modal-header .btn-close:hover,
html.dark .modal-header .close:hover,
.dark .modal-header .btn-close:hover,
.dark .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Large Modal */
.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1140px;
}

.modal-95 {
    width: 95% !important;
    max-width: 1400px;
    margin: 1rem auto;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    background: white !important;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: #374151 !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #F59E0B !important;
}

.nav-link.active {
    color: #F59E0B !important;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: #F9FAFB !important;
    border-top: 1px solid #E5E7EB;
    padding: 1.5rem 0;
}

/* ========================================
   SELECT2 OVERRIDES
   ======================================== */

.select2-dropdown {
    z-index: 1060;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-selection--single {
    height: auto !important;
    min-height: 42px;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 0.875rem;
    color: #1F2937;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0.875rem !important;
}

.select2-results__option--highlighted {
    background-color: #FEF3C7 !important;
    color: #92400E !important;
}

.select2-results__option--selected {
    background-color: #F59E0B !important;
    color: white !important;
}

.select2-selection--multiple {
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    min-height: 42px;
    padding: 0.25rem 0.5rem;
}

.select2-selection__choice {
    background-color: #F59E0B !important;
    border: none !important;
    color: white !important;
    border-radius: 0.25rem !important;
    padding: 0.125rem 0.5rem !important;
}

.select2-selection__choice__remove {
    color: white !important;
}

/* ========================================
   DATATABLES OVERRIDES - Professional Style
   ======================================== */

.dataTable {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* DataTables Wrapper Layout */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.dataTables_wrapper .row:first-child {
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 1rem;
}

html.dark .dataTables_wrapper .row:first-child,
.dark .dataTables_wrapper .row:first-child {
    border-bottom-color: #374151;
}

/* Length Select - Modern Design */
.dataTables_wrapper .dataTables_length {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6B7280 !important;
    margin: 0;
    padding: 0.5rem;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
}

html.dark .dataTables_wrapper .dataTables_length label,
.dark .dataTables_wrapper .dataTables_length label {
    color: #9CA3AF !important;
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-color: #374151;
}

.dataTables_wrapper .dataTables_length select {
    border: none !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    background-color: white !important;
    color: #374151 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
}

html.dark .dataTables_wrapper .dataTables_length select,
.dark .dataTables_wrapper .dataTables_length select {
    background-color: #374151 !important;
    color: #E5E7EB !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239CA3AF'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
}

.dataTables_wrapper .dataTables_length select:focus {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3), 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
}

/* Search Input - Modern Design */
.dataTables_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6B7280 !important;
    margin: 0;
    padding: 0.5rem;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
}

html.dark .dataTables_wrapper .dataTables_filter label,
.dark .dataTables_wrapper .dataTables_filter label {
    color: #9CA3AF !important;
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-color: #374151;
}

.dataTables_wrapper .dataTables_filter input {
    border: none !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    min-width: 220px;
    background-color: white !important;
    color: #374151 !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html.dark .dataTables_wrapper .dataTables_filter input,
.dark .dataTables_wrapper .dataTables_filter input {
    background-color: #374151 !important;
    color: #E5E7EB !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dataTables_wrapper .dataTables_filter input::placeholder {
    color: #9CA3AF;
}

.dataTables_wrapper .dataTables_filter input:focus {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3), 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
}

/* Export Buttons - Modern Design with Icons */
.dt-buttons {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0 !important;
    padding: 0.5rem;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
}

html.dark .dt-buttons,
.dark .dt-buttons {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-color: #374151;
}

.dt-buttons .dt-button,
.dt-buttons button.dt-button,
button.dt-button,
div.dt-button,
a.dt-button,
.buttons-copy,
.buttons-csv,
.buttons-excel,
.buttons-pdf,
.buttons-print {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.875rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    border-radius: 0.5rem !important;
    border: none !important;
    background: white !important;
    background-image: none !important;
    color: #4B5563 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    gap: 0.375rem;
}

html.dark .dt-buttons .dt-button,
html.dark .dt-buttons button.dt-button,
html.dark button.dt-button,
html.dark div.dt-button,
html.dark a.dt-button,
html.dark .buttons-copy,
html.dark .buttons-csv,
html.dark .buttons-excel,
html.dark .buttons-pdf,
html.dark .buttons-print,
.dark .dt-buttons .dt-button,
.dark .dt-buttons button.dt-button,
.dark button.dt-button,
.dark div.dt-button,
.dark a.dt-button,
.dark .buttons-copy,
.dark .buttons-csv,
.dark .buttons-excel,
.dark .buttons-pdf,
.dark .buttons-print {
    background: #374151 !important;
    color: #D1D5DB !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.dt-buttons .dt-button:hover,
.dt-buttons button.dt-button:hover,
button.dt-button:hover,
div.dt-button:hover,
a.dt-button:hover {
    background: #F59E0B !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.25) !important;
}

html.dark .dt-buttons .dt-button:hover,
html.dark button.dt-button:hover,
.dark .dt-buttons .dt-button:hover,
.dark button.dt-button:hover {
    background: #F59E0B !important;
    color: white !important;
}

/* Table Header - Modern Design */
.dataTable thead th,
table.dataTable thead th,
.table thead th {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%) !important;
    color: #1F2937 !important;
    font-weight: 600 !important;
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    padding: 1rem 1rem !important;
    border-bottom: 2px solid #F59E0B !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    white-space: nowrap;
    position: relative;
}

.dataTable thead th:first-child,
table.dataTable thead th:first-child {
    border-radius: 0.5rem 0 0 0;
}

.dataTable thead th:last-child,
table.dataTable thead th:last-child {
    border-radius: 0 0.5rem 0 0;
}

html.dark .dataTable thead th,
html.dark table.dataTable thead th,
html.dark .table thead th,
.dark .dataTable thead th,
.dark table.dataTable thead th,
.dark .table thead th {
    background: linear-gradient(180deg, #1F2937 0%, #111827 100%) !important;
    color: #F3F4F6 !important;
    border-bottom-color: #F59E0B !important;
}

/* Sorting Icons - Custom */
.dataTable thead .sorting,
.dataTable thead .sorting_asc,
.dataTable thead .sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 1.75rem !important;
}

.dataTable thead .sorting::before,
.dataTable thead .sorting_asc::before,
.dataTable thead .sorting_desc::before {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7280'%3E%3Cpath d='M7 10l5-5 5 5H7zm0 4l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.dataTable thead .sorting_asc::before {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F59E0B'%3E%3Cpath d='M7 14l5-5 5 5H7z'/%3E%3C/svg%3E");
}

.dataTable thead .sorting_desc::before {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F59E0B'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
}

/* Hide default DataTables sort icons */
.dataTable thead .sorting::after,
.dataTable thead .sorting_asc::after,
.dataTable thead .sorting_desc::after {
    display: none !important;
}

/* Table Body - Modern Design */
.dataTable tbody td,
table.dataTable tbody td,
.table tbody td {
    padding: 1rem 1rem !important;
    font-size: 0.875rem !important;
    color: #374151 !important;
    border-bottom: 1px solid #F3F4F6 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle !important;
    background: transparent !important;
}

html.dark .dataTable tbody td,
html.dark table.dataTable tbody td,
html.dark .table tbody td,
.dark .dataTable tbody td,
.dark table.dataTable tbody td,
.dark .table tbody td {
    color: #E5E7EB !important;
    border-bottom-color: #374151 !important;
}

.dataTable tbody tr,
table.dataTable tbody tr {
    transition: all 0.2s ease;
    background: transparent !important;
}

/* Zebra Striping */
.dataTable tbody tr:nth-child(even),
table.dataTable tbody tr:nth-child(even) {
    background-color: rgba(249, 250, 251, 0.5) !important;
}

html.dark .dataTable tbody tr:nth-child(even),
html.dark table.dataTable tbody tr:nth-child(even),
.dark .dataTable tbody tr:nth-child(even),
.dark table.dataTable tbody tr:nth-child(even) {
    background-color: rgba(31, 41, 55, 0.3) !important;
}

.dataTable tbody tr:hover,
table.dataTable tbody tr:hover {
    background-color: #FEF3C7 !important;
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

html.dark .dataTable tbody tr:hover,
html.dark table.dataTable tbody tr:hover,
.dark .dataTable tbody tr:hover,
.dark table.dataTable tbody tr:hover {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

/* Remove all table borders */
.dataTable,
.dataTable th,
.dataTable td,
table.dataTable,
table.dataTable th,
table.dataTable td,
.table-bordered,
.table-bordered th,
.table-bordered td {
    border: none !important;
}

/* Info Text */
.dataTables_wrapper .dataTables_info {
    font-size: 0.875rem !important;
    color: #6B7280 !important;
    padding-top: 1rem;
}

html.dark .dataTables_wrapper .dataTables_info,
.dark .dataTables_wrapper .dataTables_info {
    color: #9CA3AF !important;
}

/* Pagination - Modern Design */
.dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
}

html.dark .dataTables_wrapper .dataTables_paginate,
.dark .dataTables_wrapper .dataTables_paginate {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-color: #374151;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.25rem !important;
    height: 2.25rem !important;
    padding: 0 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    border-radius: 0.5rem !important;
    border: none !important;
    background: white !important;
    color: #4B5563 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    margin: 0 2px !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

html.dark .dataTables_wrapper .dataTables_paginate .paginate_button,
html.dark .dataTables_paginate .paginate_button,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button,
.dark .dataTables_paginate .paginate_button {
    background: #374151 !important;
    color: #D1D5DB !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
.dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: #F59E0B !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.25) !important;
}

html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
html.dark .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
.dark .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: #F59E0B !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.35) !important;
    font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
}

/* Bottom Row (Info + Pagination) */
.dataTables_wrapper .row:last-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
    margin-top: 1rem;
    margin-bottom: 0;
}

html.dark .dataTables_wrapper .row:last-child,
.dark .dataTables_wrapper .row:last-child {
    border-top-color: #374151;
}

/* Empty State */
.dataTable tbody td.dataTables_empty {
    text-align: center;
    padding: 3rem 1rem !important;
    color: #9CA3AF !important;
    font-size: 0.875rem;
}

/* Processing Indicator */
.dataTables_wrapper .dataTables_processing {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html.dark .dataTables_wrapper .dataTables_processing,
.dark .dataTables_wrapper .dataTables_processing {
    background: rgba(31, 41, 55, 0.9) !important;
    color: #E5E7EB !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dataTables_wrapper .row:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dt-buttons {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: auto;
    }

    .dataTables_wrapper .row:last-child {
        flex-direction: column;
        gap: 1rem;
    }

    .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
        width: 100%;
    }
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.alert-info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.badge-primary, .bg-primary {
    background-color: #F59E0B !important;
    color: white;
}

.badge-success, .bg-success {
    background-color: #10B981 !important;
    color: white;
}

.badge-danger, .bg-danger {
    background-color: #EF4444 !important;
    color: white;
}

.badge-warning, .bg-warning {
    background-color: #FBBF24 !important;
    color: #78350F;
}

/* ========================================
   FLATPICKR OVERRIDES
   ======================================== */

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #F59E0B;
    border-color: #F59E0B;
}

.flatpickr-day:hover {
    background: #FEF3C7;
}

/* ========================================
   NAV TABS
   ======================================== */

.nav-tabs {
    background: transparent !important;
    border-bottom: 1px solid #E5E7EB;
}

.nav-tabs .nav-link {
    color: #6B7280 !important;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: #F59E0B !important;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #F59E0B !important;
    background: transparent !important;
    border-bottom: 2px solid #F59E0B !important;
}

/* ========================================
   LOADING STATES
   ======================================== */

.is-loading {
    position: relative;
    color: transparent !important;
}

.is-loading > * {
    opacity: 0 !important;
}

.is-loading:after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    content: '';
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #F59E0B;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-primary { color: #F59E0B !important; }
.text-success { color: #10B981 !important; }
.text-danger { color: #EF4444 !important; }
.text-warning { color: #F59E0B !important; }
.text-muted { color: #6B7280 !important; }
.text-sm { font-size: 0.875rem !important; }

.bg-light { background-color: #F9FAFB !important; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }

.hidden-cell { display: none; }

/* Hide loader */
#loading { display: none !important; }

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (min-width: 768px) {
    .main-content .container-fluid {
        padding-right: 2rem !important;
        padding-left: 2rem !important;
    }
}

@media (max-width: 767px) {
    .card-body {
        padding: 1rem;
    }

    .modal-95 {
        width: 100%;
        margin: 0.5rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }

    .card {
        border: 1px solid #000;
        box-shadow: none;
    }

    body {
        background: white;
    }
}
