/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
background-color:white;
    text-decoration: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    flex-grow: 1;
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.navbar-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    border-bottom-color: var(--primary-color);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-user-name {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0 1rem 0;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control:disabled {
    background-color: var(--bg-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
}

.field-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

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

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

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

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

.btn-warning {
    color: white;
    background-color: var(--warning-color);
}

.btn-outline {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Alerts */
.alert, .alert-no-hide {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
}

.alert-success {
    color: #166534;
    background-color: var(--success-bg);
    border-color: var(--success-border);
}

.alert-error {
    color: #991b1b;
    background-color: var(--error-bg);
    border-color: var(--error-border);
}

.alert-warning {
    color: #92400e;
    background-color: #fffbeb;
    border-color: #fde68a;
}

.alert-info {
    color: #1e40af;
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    background-color: var(--bg-color);
    color: var(--text-color);
}

tbody tr:hover {
    background-color: var(--bg-color);
}

/* Authentication Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-form {
    margin-bottom: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--card-bg);
}

.pagination a:hover {
    background-color: var(--bg-color);
    text-decoration: none;
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
.d-flex, .billing-code-row { display: flex !important;
        flex-direction: column !important;
        align-items: unset !important;
}
.main-content-area{
    flex: 1;
    min-width: 100% !important;
    max-width: 100% !important;
}
    .navbar-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .navbar-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding: 0;
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-menu a {
        display: block;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        text-align: center;
    }
    
    .navbar-user {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .navbar-user a {
        display: block;
        text-align: center;
        padding: 0.5rem;
        background: var(--bg-color);
        border-radius: var(--radius-md);
    }
    
    .page-header {
        text-align: center;
    }
    
    .page-header.d-flex {
        flex-direction: column;
        align-items: center !important;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr !important;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .card {
        margin: 1rem -0.5rem;
        border-radius: 0;
    }
    
    .card-body,
    .card-header,
    .card-footer {
        padding: 1rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 80vh;
    }
    
    /* Mobile-friendly stat cards */
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Mobile forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile navigation */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .sidebar {
        width: 100% !important;
        position: relative !important;
        margin-bottom: 1rem;
        max-height: none;
        overflow: visible;
    }
    
    /* Hide all menu items by default on mobile */
    .sidebar-menu li {
        display: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Always show the active item */
    .sidebar-menu li:has(a.active) {
        display: block;
        border-bottom: none;
    }
    
    /* When sidebar is expanded, show all items */
    .sidebar.expanded .sidebar-menu li {
        display: block;
    }
    
    /* Style the active item as a dropdown trigger */
    .sidebar-menu li:has(a.active) a {
        position: relative;
        justify-content: space-between;
    }
    
    /* Add dropdown arrow to active item */
    .sidebar-menu li:has(a.active) a::after {
        content: '▼';
        font-size: 0.75rem;
        transition: transform 0.3s ease;
        margin-left: auto;
    }
    
    /* Rotate arrow when expanded */
    .sidebar.expanded .sidebar-menu li:has(a.active) a::after {
        transform: rotate(180deg);
    }
    
    /* Style non-active items when expanded */
    .sidebar.expanded .sidebar-menu li:not(:has(a.active)) {
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar.expanded .sidebar-menu li:last-child {
        border-bottom: none;
    }
    
    /* Maintain border radius on first and last items */
    .sidebar-menu li:first-child a {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .sidebar-menu li:last-child a {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    /* When not expanded, active item gets full border radius */
    .sidebar:not(.expanded) .sidebar-menu li:has(a.active) a {
        border-radius: var(--radius-lg);
    }
    
    /* When expanded, fix border radius for visible first/last items */
    .sidebar.expanded .sidebar-menu li:first-child a {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .sidebar.expanded .sidebar-menu li:last-child a {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    /* Prevent background from extending beyond border radius */
    .sidebar-menu li:first-child a:hover,
    .sidebar-menu li:first-child a.active {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .sidebar-menu li:last-child a:hover,
    .sidebar-menu li:last-child a.active {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    /* When sidebar is collapsed, active item needs full radius */
    .sidebar:not(.expanded) .sidebar-menu li:has(a.active) a:hover,
    .sidebar:not(.expanded) .sidebar-menu li:has(a.active) a.active {
        border-radius: var(--radius-lg);
    }
    
    /* Smooth expansion animation */
    .sidebar-menu {
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    /* Ensure proper z-index for dropdown */
    .sidebar {
        z-index: 100;
    }
    .content-with-sidebar {
        flex-direction: column !important;
    }
}

/* Desktop: Ensure normal behavior */
@media (min-width: 769px) {
    .sidebar-menu li {
        display: block !important;
    }
    
    .sidebar-menu li:has(a.active) a::after {
        display: none;
    }
}


/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navbar-menu {
        gap: 1rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .sidebar,
    .page-header .btn {
        display: none;
    }
    
    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}

.badge-primary { background-color: var(--primary-color); color: white; }
.badge-success { background-color: var(--success-color); color: white; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: white; }
.badge-secondary { background-color: var(--secondary-color); color: white; }
.badge-info { background-color: var(--primary-color); color: white; }

/* Sidebar Layout */
.content-with-sidebar {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    position: sticky;
    top: 1rem;
    overflow: hidden;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-menu a:hover {
    background-color: var(--bg-color);
    text-decoration: none;
}

.sidebar-menu a.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.sidebar-menu .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.main-content-area {
    flex: 1;
    min-width: 0;
}

/* Icons */
.icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
}

.icon-user::before { content: "👤"; }
.icon-logout::before { content: "🚪"; }
.icon-dashboard::before { content: "📊"; }
.icon-calendar::before { content: "📅"; }
.icon-money::before { content: "💰"; }
.icon-invoice::before { content: "📄"; }
.icon-building::before { content: "🏢"; }
.icon-code::before { content: "🏷️"; }
.icon-users::before { content: "👥"; }
.icon-logs::before { content: "📋"; }
.icon-settings::before { content: "⚙️"; }
.icon-business::before { content: "🏪"; }
.icon-expense::before { content: "💳"; }

/* DataTables Integration */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_filter {
    float: right;
    margin-bottom: 1rem;
}

.dataTables_filter input {
    margin-left: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.dataTables_length select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 0 0.5rem;
}

.dataTables_info {
    padding-top: 1rem;
}

.dataTables_paginate {
    padding-top: 1rem;
    text-align: right;
}

.paginate_button {
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    cursor: pointer;
}

.paginate_button:hover {
    background: var(--bg-color);
}

.paginate_button.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

/* Grouped vs Individual Tables Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-toggle button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.view-toggle button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.employer-section {
    margin-bottom: 2rem;
}

.employer-section-header {
    background: var(--bg-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.employer-section-body {
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Sub-items styling for invoice line items */
.sub-item {
    padding-left: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sub-item::before {
    content: "↳ ";
    margin-right: 0.25rem;
}

/* DataTables Pagination - Match Custom Pagination Style */
.dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    margin-top: 2rem !important;
    padding-top: 0 !important;
    text-align: center !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.5rem 0.75rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    transition: background-color 0.2s, color 0.2s !important;
    margin: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    text-decoration: none !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

/* Remove default DataTables pagination styles that conflict */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    padding: 0.5rem 0.75rem !important;
}

/* Ensure ellipsis styling */
.dataTables_wrapper .dataTables_paginate .ellipsis {
    padding: 0.75rem 0.75rem !important;
    color: var(--text-muted) !important;
}