/* =============================
   MODERN UI SYSTEM - ENHANCED VERSION
============================= */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --success-color: #22c55e;
    --success-dark: #16a34a;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --info-color: #06b6d4;
    --info-dark: #0891b2;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
body {
    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}
.page-btn {
    margin-left: auto;
}
/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header h4 {
    margin: 0;
    font-weight: 500;
    font-size: 1.25rem;
}

.page-header .page-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.page-header .page-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}

.page-header .page-btn .btn {
    background: #007bff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-header .page-btn .btn:hover {
    background: #0056b3;
    transform: none;
    box-shadow: none;
}

/* Statistics Cards */
.stats-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #6366f1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stats-card:hover::before {
    transform: scaleX(1);
}



.stats-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.stats-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stats-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.stats-icon.primary {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
}
.stats-icon.success {
    background: linear-gradient(135deg, var(--success-color), #16a34a);
}
.stats-icon.warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}
.stats-icon.danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}
.stats-icon.info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
}



/* Main Card */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    display: inline-flex;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1 rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    margin-top: 1px;
    margin-left: 10px;
}
.row>*{
    padding-left: 10px;
    padding-right: 10px;
}
/* Form Controls */
.form-control,
.form-select {
    background-color: white;
    border: 1px solid #000;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

select.form-control,
.form-select {
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Enhanced Button Styles */
.btn {
    font-weight: 500;
    
    text-transform: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), var(--success-dark));
    color: white;
    border: 1px solid var(--success-color);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-dark), var(--success-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), var(--warning-dark));
    color: white;
    border: 1px solid var(--warning-color);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-dark), var(--warning-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), var(--danger-dark));
    color: white;
    border: 1px solid var(--danger-color);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-dark), var(--danger-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), var(--info-dark));
    color: white;
    border: 1px solid var(--info-color);
}

.btn-info:hover {
    background: linear-gradient(135deg, var(--info-dark), var(--info-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    width: auto;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Table Styles */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #dee2e6;
    max-width: 100%;
    overflow-x: auto;
}

.datatables-users {
    margin: 0;
    min-width: 1200px;
}
/* DataTables Scroll Fix */
.dataTables_scrollHead {
    background: white;
}

.dataTables_scrollBody {
    border-top: none !important;
}

.dataTables_scrollHeadInner table {
    margin-bottom: 0 !important;
}

/* Keep header background solid */
table.dataTable thead th {
    background: #f8f9fa !important;
}

.datatables-users thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.datatables-users tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.datatables-users tbody tr:hover {
    background-color: #f8f9fa;
}

.datatables-users tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border: none;
    white-space: nowrap;
}

/* Status Badges */
.status-badge {
    padding: 0.1rem 0.1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    text-decoration: none;
}
/* Force white color for active page number */
.dataTables_wrapper .dataTables_paginate a.paginate_button.current {
    background: #4f46e5 !important;
    color: #ffffff !important;  /* 👈 Force WHITE */
    border: none !important;
}

/* Also target hover & focus */
.dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate a.paginate_button.current:focus {
    color: #ffffff !important;
}
.status-badge:hover {
    transform: none;
    box-shadow: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* .btn-action {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid;
}

.btn-action:hover {
    transform: none;
    box-shadow: none;
} */

.btn-view {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-view:hover {
    background: #545b62;
    border-color: #545b62;
}

.btn-edit {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-edit:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Add Button */
.btn-add {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: white;
    border: none;
   
    border-radius: 8px;
    font-weight: 300;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;

}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Links */
.table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}


/* Item Icons (Employee, Customer, etc.) */
.item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    transition: all 0.2s ease;
}

.item-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.item-name a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.item-name a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.item-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Row Hover Effects */
.item-row:hover {
    background-color: #f8f9fa;
}

.item-row:hover .item-icon {
    transform: none;
}

/* Scrollbar Styling */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Enhanced Interactions */
.interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.interactive:hover {
    transform: scale(1.02);
}

.interactive:active {
    transform: scale(0.98);
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
}

/* Enhanced Focus States */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
   
}

/* Enhanced Hover States */


.btn:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .stats-card, .stat-card {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        min-height: auto !important;
    }

    .stats-label, .stat-label {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }

    .stats-number, .stat-number {
        font-size: 1.1rem !important;
    }

    .stats-icon, .stat-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }

    .page-header {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .credit-card-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stats-card {
        min-width: 100%;
    }

    .page-header .page-btn {
        margin-top: 1rem;
    }
}

/* =============================
   GLOBAL STATUS BADGE STYLES
============================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
    background: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Status Badge Variants */
.status-badge.active,
.status-badge.running {
    border-color: #10b981;
    color: #10b981;
}

.status-badge.active:hover,
.status-badge.running:hover {
    border-color: #059669;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.status-badge.pending,
.status-badge.paused {
    border-color: #f59e0b;
    color: #f59e0b;
}

.status-badge.pending:hover,
.status-badge.paused:hover {
    border-color: #d97706;
    color: #d97706;
    background: rgba(245, 158, 11, 0.1);
}

.status-badge.completed {
    border-color: #10b981;
    color: #10b981;
}

.status-badge.completed:hover {
    border-color: #059669;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.status-badge.success {
    border-color: #22c55e;
    color: #22c55e;
}

.status-badge.success:hover {
    border-color: #16a34a;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
}

.status-badge.error {
    border-color: #ef4444;
    color: #ef4444;
}

.status-badge.error:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.status-badge.info {
    border-color: #06b6d4;
    color: #06b6d4;
}

.status-badge.info:hover {
    border-color: #0891b2;
    color: #0891b2;
    background: rgba(6, 182, 212, 0.1);
}

.status-badge.warning {
    border-color: #f59e0b;
    color: #f59e0b;
}

.status-badge.warning:hover {
    border-color: #d97706;
    color: #d97706;
    background: rgba(245, 158, 11, 0.1);
}

.status-badge i {
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .status-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}
   


.detail-modal {
    border-radius: 14px;
    padding: 10px;
}

.detail-title {
    font-weight: 600;
    font-size: 18px;
    border-bottom: 2px solid #000;
    display: inline-block;
    padding-bottom: 4px;
}

.detail-box {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

/* Each row */
.detail-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    padding: 10px 0;
    border-bottom: 1px dashed #d1d5db;
}

.detail-row:last-child {
    border-bottom: none;
}

/* Label */
.detail-label {  font-family: 'Inter', 'Poppins', 'Segoe UI', sans-serif;
    font-size: 13.5px;
    font-weight: 700;           /* Bold */
    letter-spacing: 0.04em;     /* Clean spacing */
    color: #374151;             /* Dark gray (not pure black) */
    text-transform: uppercase;
   
}

/* Value */
.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    word-break: break-word;
}

/* Mobile fix */
@media (max-width: 576px) {
    .detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* =============================
   DATATABLES COMPACT FILTERS & UI
============================= */
.dataTables_wrapper .row:first-child {
    align-items: center;
    margin-bottom: 0.5rem !important;
}

/* Mobile Fix: Force filters into a single row, regardless of container structure */
@media (max-width: 768px) {
    /* If length and filter are in separate rows, force the rows to be side-by-side */
    .dataTables_wrapper > .row:nth-child(1),
    .dataTables_wrapper > .row:nth-child(2),
    .dataTables_wrapper > div.row:first-of-type,
    .dataTables_wrapper > div.row:nth-of-type(2) {
        display: inline-flex !important;
        width: 50% !important;
        margin: 0 !important;
        padding: 5px 0 !important;
        vertical-align: middle !important;
        flex-direction: row !important;
        border: none !important;
    }

    /* Ensure the wrapper doesn't force blocks */
    .dataTables_wrapper {
        display: block !important;
        text-align: center !important; /* Helps with inline-flex centering */
    }

    /* If they are in the SAME row but stacked in separate columns */
    .dataTables_wrapper .row:first-child,
    .dataTables_wrapper .row.mx-2:first-child {
        display: flex !important;
        flex-flow: row nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Override Bootstrap's col-sm-12 stacking */
    .dataTables_wrapper .row > div,
    .dataTables_wrapper .row > [class*="col-"] {
        width: auto !important;
        flex: 1 1 auto !important;
        max-width: 50% !important;
        padding: 0 4px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Target the actual control containers */
    .dataTables_length,
    .dataTables_filter,
    [id$="_length"],
    [id$="_filter"] {
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
        width: 100% !important;
        font-size: 0.75rem !important;
    }

    .dataTables_filter {
        justify-content: flex-end !important;
    }

    .dataTables_length {
        justify-content: flex-start !important;
    }

    /* Compact inputs */
    .dataTables_wrapper .dataTables_filter input {
        width: 100px !important;
        min-width: 80px !important;
        margin-left: 5px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
    }

    .dataTables_wrapper .dataTables_length select {
        width: auto !important;
        height: 32px !important;
        margin: 0 4px !important;
        padding: 2px 18px 2px 8px !important;
    }

    /* Hide redundant text to save space */
    .dataTables_length label {
        font-size: 0 !important;
    }
    .dataTables_length label::before {
        content: "Show";
        font-size: 0.75rem !important;
    }
    .dataTables_filter label {
        font-size: 0 !important;
    }
    .dataTables_filter label::before {
        content: "Search";
        font-size: 0.75rem !important;
    }

    /* Ensure the table itself stays full width below the filters */
    .task-table-wrap, 
    .dataTables_scroll, 
    table.dataTable {
        display: table !important; /* Reset display if flex blew it up */
        width: 100% !important;
        clear: both !important;
    }
}

.dataTables_filter label {
    margin-bottom: 0 !important;
}

.dataTables_length label,
.dataTables_filter label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b; /* var(--text-secondary) */
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.2rem 1.5rem 0.2rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    height: auto;
    width: auto;
    display: inline-block;
    margin: 0 0.5rem;
    background-position: right 0.2rem center;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    height: auto;
    width: 160px; /* Compact width */
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    width: 220px; /* Expand on focus */
    border-color: #4f46e5;
    box-shadow: 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Pagination Compact */
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate .page-link {
   padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(152, 148, 219, 0.2);
}
  /* Override DataTables current page color */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;   /* your desired color */
}


.dataTables_wrapper .dataTables_info {
    font-size: 0.8rem !important;
    padding-top: 0.8rem !important;
    color: #64748b !important;
}

/* =============================
   CARD VIEW SYSTEM (Reusable)
   ============================= */

/* Card View Container & Layout */
#taskCardContainer, 
#projectCardContainer, 
#noteCardContainer {
    display: none;
    /* grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); */
    gap: 1.25rem;
    padding: 1rem 0;
    animation: fadeIn 0.4s ease-out;
}

.task-card-view-active .card-datatable {
    display: none !important;
}

/* Base Card Style */
.task-card, .project-card, .note-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eef0f2;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.task-card:hover, .project-card:hover, .note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}

/* Priority Accents */
.task-card::before, .project-card::before, .note-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.priority-urgent::before { background: #ef4444; width: 6px; }
.priority-high::before { background: #f97316; }
.priority-medium::before { background: #f59e0b; }
.priority-normal::before { background: #10b981; }

/* Card Header */
.task-card-header, .project-card-header, .note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-card-id, .project-card-id, .note-card-id {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Card Content */
.task-card-title, .project-card-title, .note-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.task-card-project, .project-card-customer, .note-card-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Info Grid */
.task-card-body, .project-card-body, .note-card-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.task-card-info-item, .project-card-info-item, .note-card-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-card-info-icon, .project-card-info-icon, .note-card-info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.task-card-info-content, .project-card-info-content, .note-card-info-content {
    display: flex;
    flex-direction: column;
}

.task-card-label, .project-card-label, .note-card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
    margin-bottom: 2px;
}

.task-card-value, .project-card-value, .note-card-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

/* Status Section */
.task-card-status-section, .project-card-status-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f5f9;
}

.task-card-status-grid, .project-card-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.task-card-status-item, .project-card-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.task-card-status-label, .project-card-status-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

/* Card Footer */
.task-card-footer, .project-card-footer, .note-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.task-card-date, .project-card-date, .note-card-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.task-card-actions, .project-card-actions, .note-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Card View Controls */
#cardViewControls {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    display: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3.5rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
    display: block;
}

/* Card View Layout Toggles */
.task-card-view-active #taskTableWrapper,
.task-card-view-active #projectTableWrapper,
.task-card-view-active #noteTableWrapper { display: none !important; }

.task-card-view-active #taskCardContainer,
.task-card-view-active #projectCardContainer,
.task-card-view-active #noteCardContainer { display: grid !important; }

.task-card-view-active #cardViewControls { display: block !important; }

/* Responsive Grid */
@media (max-width: 768px) {
    #taskCardContainer, 
    #projectCardContainer, 
    #noteCardContainer {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 640px) {
    #taskCardContainer, #projectCardContainer, #noteCardContainer { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    #taskCardContainer, #projectCardContainer, #noteCardContainer { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1400px) {
    #taskCardContainer, #projectCardContainer, #noteCardContainer { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 2500px) {
    #taskCardContainer, #projectCardContainer, #noteCardContainer {
        grid-template-columns: repeat(4, 1fr);
    }
    .th-check { width: 50px !important; min-width: 50px !important; text-align: center; }
    .th-id { width: 90px !important; min-width: 90px !important; }
    .th-title { min-width: 300px !important; width: auto !important; }
    .th-project { width: 140px !important; min-width: 140px !important; }
    .th-employee { width: 130px !important; min-width: 130px !important; }
    .th-type { width: 100px !important; min-width: 100px !important; }
    .th-date { width: 120px !important; min-width: 120px !important; }
    .th-status { width: 150px !important; min-width: 150px !important; }
    .th-customer { width: 110px !important; min-width: 110px !important; }
    .th-actions { width: 120px !important; min-width: 120px !important; }

    /* 4K UI Enhancements for DataTables Controls */
    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        padding: 0.5rem;
        font-size: 0.9rem;
        border-radius: 6px;
        border: 1px solid #cbd5e1;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        padding-top: 1rem !important;
        font-size: 0.9rem;
    }
}

