/* Dashboard Common Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Dashboard Layout */
.dashboard-container {
    padding: 20px;
    margin-top: 20px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-title {
    font-family: 'Gotham-Bold', sans-serif;
    color: var(--dark-color);
    margin-bottom: 15px;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
    font-family: 'Gotham-Bold', sans-serif;
}

.dashboard-card-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.dashboard-card-header h2 i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.dashboard-card-header .btn-group,
.dashboard-card-header > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Standardized Button Styles - Updated with Higher Specificity */
.dashboard-container .btn,
.dashboard-card .btn,
.dashboard-table .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
    height: 38px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-decoration: none !important;
    min-width: unset !important;
    width: auto !important;
}

/* Override specific button styles */
.dashboard-container .btn-primary,
.dashboard-card .btn-primary,
.dashboard-table .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    height: 38px !important;
    padding: 0.5rem 1rem !important;
}

.dashboard-container .btn-success,
.dashboard-card .btn-success,
.dashboard-table .btn-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
    height: 38px !important;
    padding: 0.5rem 1rem !important;
}

.dashboard-container .btn-info,
.dashboard-card .btn-info,
.dashboard-table .btn-info {
    background-color: var(--info-color) !important;
    border-color: var(--info-color) !important;
    color: white !important;
    height: 38px !important;
    padding: 0.5rem 1rem !important;
}

.dashboard-container .btn-secondary,
.dashboard-card .btn-secondary,
.dashboard-table .btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
    height: 38px !important;
    padding: 0.5rem 1rem !important;
}

/* Small button variants */
.dashboard-container .btn-sm,
.dashboard-card .btn-sm,
.dashboard-table .btn-sm,
.table-actions .btn,
.worker-actions .btn,
.btn-group .btn {
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    min-width: 100px !important;
}

/* Table action buttons */
.table-actions .btn-info,
.table-actions .btn-primary,
.table-actions .btn-secondary,
.table-actions .btn-success,
.table-actions .resume-btn {
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    min-width: 100px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Download buttons */
.dashboard-card-header .btn-success,
.dashboard-card-header .btn-primary,
.recent-applications-actions .btn-success,
.recent-applications-actions .btn-primary,
.download-pdf-btn,
.download-csv-btn,
.download-all-resumes-btn {
    height: 38px !important;
    padding: 0 1rem !important;
    font-size: 0.9rem !important;
    min-width: unset !important;
}

/* Profile and History buttons */
.worker-actions .btn,
.btn-group .btn-info,
.btn-group .btn-primary,
.btn-group .btn-success,
.btn-group .btn-secondary {
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1 !important;
    min-width: unset !important;
}

/* Icon alignment */
.dashboard-container .btn i,
.dashboard-card .btn i,
.dashboard-table .btn i {
    font-size: 1rem !important;
    margin-right: 0.25rem !important;
    position: relative !important;
    top: 0 !important;
}

/* Remove margin from last icon */
.dashboard-container .btn i:last-child,
.dashboard-card .btn i:last-child,
.dashboard-table .btn i:last-child {
    margin-right: 0 !important;
}

/* Hover states */
.dashboard-container .btn:hover,
.dashboard-card .btn:hover,
.dashboard-table .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Header Styles */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.dashboard-title,
.dashboard-card-header h2,
.accordion-button,
.stats-card h3,
.action-button h4,
.footer-section h4 {
    font-family: 'Gotham-Bold', sans-serif !important;
    font-weight: 700 !important;
}

/* Ensure buttons in tables maintain consistent height */
.dashboard-table .btn {
    height: 32px;
}

.dashboard-table .btn-group .btn {
    height: 32px;
}

/* Worker actions buttons consistency */
.worker-actions .btn {
    height: 32px;
}

/* Quick actions buttons consistency */
.quick-actions .btn {
    height: 32px;
}

/* Recent applications buttons consistency */
.recent-applications-actions .btn {
    height: 38px;
}

/* Table action buttons consistency */
.table-actions .btn {
    height: 32px;
    min-width: 100px;
}

/* Ensure download badges maintain consistent height */
.download-badge {
    height: 32px;
    display: inline-flex;
    align-items: center;
}

/* Ensure consistent heights in pagination controls */
.pagination-controls .btn {
    height: 32px;
}

/* Quick range buttons consistency */
.quick-range-buttons .btn {
    height: 32px;
}

/* Table Styles */
.dashboard-table {
    width: 100%;
    margin-bottom: 0;
}

.dashboard-table th {
    padding: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.dashboard-table th i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9em;
}

.dashboard-table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Action Buttons in Tables */
.dashboard-table .btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dashboard-table .btn {
    height: 32px;
    padding: 0 0.75rem;
}

/* Recent Applications Section */
.recent-applications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recent-applications-header .btn {
    margin-left: 0.5rem;
}

.recent-applications-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-applications-actions .btn {
    height: 38px;
}

/* Table Action Buttons */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.table-actions .btn {
    flex: 1;
    min-width: 100px;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.stats-card h3 {
    font-family: 'Gotham-Bold', sans-serif;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-card i {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
}

.action-button i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.action-button:hover i {
    transform: scale(1.1);
}

/* Status Badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.875rem;
}

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

.status-pending {
    background-color: var(--warning-color);
    color: black;
}

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

/* Admin Specific Styles */
.admin-controls {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.admin-controls .btn {
    margin-right: 10px;
}

/* Super Admin Specific */
.super-admin-alert {
    background-color: #ffe5e5;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .dashboard-table {
        display: block;
        overflow-x: auto;
    }
    
    .rating-bars {
        width: 160px;
    }
    
    .rating-bar {
        height: 24px;
    }
    
    .rating-text, .rating-label {
        font-size: 0.7rem;
    }
    
    .worker-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .worker-actions .btn {
        width: 100%;
    }

    .action-button {
        padding: 15px;
    }

    .action-button i {
        font-size: 1.5rem;
    }

    .stats-card {
        padding: 20px;
    }

    .stats-card h3 {
        font-size: 1rem;
    }

    .footer-section {
        padding: 20px;
        margin-bottom: 15px;
    }
}

/* Chart Containers */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Activity Feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

/* Notification Styles */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 3px 6px;
    font-size: 0.75rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Workers Section Styles */
.workers-section {
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
}

.workers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.workers-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.worker-stats {
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.worker-stats.has-working {
    background: var(--success-color);
}

.worker-stats i {
    margin-right: 5px;
    font-size: 0.9em;
}

/* Worker Table Styles */
.worker-table {
    width: 100%;
    border-collapse: collapse;
}

.worker-table th {
    padding: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

.worker-table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.worker-row td {
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

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

/* Status Badge Updates */
.worker-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    min-width: 85px;
}

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

.status-not-working {
    background-color: var(--secondary-color);
    color: white;
}

.status-ratable {
    background-color: var(--warning-color);
    color: black;
    margin-left: 4px;
    min-width: auto;
}

/* Rating Bar Updates */
.rating-bars {
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rating-bar {
    height: 28px;
    background: #f8f9fa;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.rating-bar:first-child {
    margin-bottom: 2px;
}

.rating-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.rating-label, .rating-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    z-index: 1;
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.2),
        1px -1px 0 rgba(0,0,0,0.2),
        -1px 1px 0 rgba(0,0,0,0.2),
        1px 1px 0 rgba(0,0,0,0.2);
    mix-blend-mode: luminosity;
}

/* Job Rating Colors with Subtle Gradients */
.rating-fill.job-rating[data-rating="0"] { background: linear-gradient(135deg, #e66767, #d35f5f); }
.rating-fill.job-rating[data-rating="1"] { background: linear-gradient(135deg, #e66767, #d35f5f); }
.rating-fill.job-rating[data-rating="2"] { background: linear-gradient(135deg, #e67f67, #d37560); }
.rating-fill.job-rating[data-rating="3"] { background: linear-gradient(135deg, #e69767, #d38960); }
.rating-fill.job-rating[data-rating="4"] { background: linear-gradient(135deg, #6789e6, #607ad3); }
.rating-fill.job-rating[data-rating="5"] { background: linear-gradient(135deg, #6789e6, #607ad3); }
.rating-fill.job-rating[data-rating="6"] { background: linear-gradient(135deg, #67a2e6, #6094d3); }
.rating-fill.job-rating[data-rating="7"] { background: linear-gradient(135deg, #67c5e6, #60b7d3); }
.rating-fill.job-rating[data-rating="8"] { background: linear-gradient(135deg, #67e667, #60d360); }
.rating-fill.job-rating[data-rating="9"] { background: linear-gradient(135deg, #5ee65e, #54d354); }
.rating-fill.job-rating[data-rating="10"] { background: linear-gradient(135deg, #4cd34c, #45c045); }

/* Overall Rating Colors with Subtle Gradients */
.rating-fill.overall-rating[data-rating="0"] { background: linear-gradient(135deg, #e65c5c, #d35454); }
.rating-fill.overall-rating[data-rating="1"] { background: linear-gradient(135deg, #e65c5c, #d35454); }
.rating-fill.overall-rating[data-rating="2"] { background: linear-gradient(135deg, #e67567, #d36b5e); }
.rating-fill.overall-rating[data-rating="3"] { background: linear-gradient(135deg, #e68d67, #d38260); }
.rating-fill.overall-rating[data-rating="4"] { background: linear-gradient(135deg, #5c7ee6, #5470d3); }
.rating-fill.overall-rating[data-rating="5"] { background: linear-gradient(135deg, #5c7ee6, #5470d3); }
.rating-fill.overall-rating[data-rating="6"] { background: linear-gradient(135deg, #5c9ee6, #548fd3); }
.rating-fill.overall-rating[data-rating="7"] { background: linear-gradient(135deg, #5cbfe6, #54aed3); }
.rating-fill.overall-rating[data-rating="8"] { background: linear-gradient(135deg, #5ce65c, #54d354); }
.rating-fill.overall-rating[data-rating="9"] { background: linear-gradient(135deg, #4cd34c, #45c045); }
.rating-fill.overall-rating[data-rating="10"] { background: linear-gradient(135deg, #40bf40, #3ab03a); }

/* Action Buttons */
.worker-actions {
    display: flex;
    gap: 6px;
}

.worker-actions .btn {
    padding: 4px 8px;
    font-size: 0.85rem;
    min-width: 80px;
}

/* Hours Display */
.hours-worked {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
}

.overtime-hours {
    color: var(--danger-color);
    font-weight: 500;
}

.date-range {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
    margin-left: 8px;
}

/* Update worker-status for link styling */
.worker-status.status-ratable {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.worker-status.status-ratable:hover {
    transform: scale(1.05);
    text-decoration: none;
    color: #000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .date-range {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Accordion Styles */
.accordion {
    width: 100%;
    box-sizing: border-box;
}

.accordion-item {
    border: none;
    margin-bottom: 1px;
    width: 100%;
    box-sizing: border-box;
}

.accordion-button {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 1.25rem;
    text-align: left;
    border: 0;
    font-family: 'Gotham-Bold', sans-serif;
    font-size: 1.1rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--light-color);
    color: var(--dark-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.accordion-collapse {
    width: 100%;
    box-sizing: border-box;
}

.accordion-body {
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.project-section > .accordion-header .accordion-button {
    background: linear-gradient(to right, #f1f5f9, #ffffff);
    border-left: 4px solid var(--primary-color);
}

.job-section > .accordion-header .accordion-button {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    border-left: 4px solid var(--info-color);
}

.accordion-button .date-range,
.accordion-button .worker-count-badge {
    margin-left: 10px;
    font-weight: normal;
}

.worker-table {
    margin-bottom: 0;
}

.worker-table thead th {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

.project-section {
    margin-bottom: 5px;
}

.job-section {
    margin-left: 25px;
    margin-bottom: 4px;
}

/* Update existing styles */
.worker-row td {
    background-color: #fff;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #eee;
}

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

.work-schedule {
    display: inline-flex;
    gap: 4px;
    margin-left: auto;
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-style: normal;
}

.day-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.7rem;
    background-color: #e9ecef;
    color: #6c757d;
}

.day-indicator.work-day {
    background-color: #28a745;
    color: white;
}

.day-indicator.today {
    border: 2px solid #007bff;
    font-weight: bold;
}

/* Adjust spacing in the accordion and tables */
.worker-table th,
.worker-table td {
    padding: 1rem;
    line-height: 1.4;
}

.worker-status {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.rating-bars {
    width: 180px;
}

.rating-bar {
    height: 28px;
    border-radius: 14px;
}

.rating-text {
    font-size: 1rem;
}

/* Improve hierarchy visibility */
.project-section > .accordion-header .accordion-button {
    background: linear-gradient(to right, #f1f5f9, #ffffff);
    border-left: 4px solid var(--primary-color);
}

.job-section > .accordion-header .accordion-button {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    border-left: 4px solid var(--info-color);
}

/* Alternating Row Colors */
.worker-row:nth-child(even) td {
    background-color: #f8fafc;
}

.worker-row:nth-child(odd) td {
    background-color: #ffffff;
}

/* Dashboard Footer Styles */
.dashboard-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-section {
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    height: 100%;
    transition: all 0.3s ease;
}

.footer-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.footer-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.footer-section ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.footer-section ul li i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

.footer-section ul li a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .dashboard-footer {
        padding: 20px 0;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
}

.job-header-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.job-title-and-date {
    flex: 1;
    min-width: 0;
}

.job-info-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    white-space: nowrap;
}

/* PDF Download Button Styles */
.download-pdf-btn,
.download-project-pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.download-pdf-btn:hover,
.download-project-pdf:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.download-pdf-btn i,
.download-project-pdf i {
    font-size: 1.1em;
}

.download-project-pdf {
    padding: 4px 8px;
    font-size: 0.85rem;
    margin-left: 10px;
    z-index: 2;
}

/* Project Header Styles */
.project-header-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.project-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
}

.project-title-and-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.project-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    margin-top: 5px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

/* Download Button Styles */
.download-project-pdf {
    padding: 4px 12px;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.download-project-pdf:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #212529;
    transform: translateY(-1px);
}

.download-project-pdf i {
    font-size: 1em;
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .project-header-actions {
        padding-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .download-project-pdf {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State Styles */
.download-pdf-btn:disabled,
.download-project-pdf:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    margin-right: 6px;
}

/* Container styles */
.container {
    width: 100% !important;
    max-width: 1320px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
}

/* Override card styles from style.css */
.dashboard-card.workers-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px auto !important;
    box-sizing: border-box !important;
}

.dashboard-card.workers-section .card,
.dashboard-card.workers-section .card-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure accordion items are properly contained */
.workers-section .accordion {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.workers-section .accordion-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.workers-section .accordion-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.workers-section .accordion-collapse {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.workers-section .accordion-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

/* Ensure project sections are properly contained */
.workers-section .project-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure job sections are properly indented but contained */
.workers-section .job-section {
    width: calc(100% - 25px) !important;
    max-width: calc(100% - 25px) !important;
    box-sizing: border-box !important;
    margin-left: 25px !important;
    margin-right: 0 !important;
}

/* Ensure tables are properly contained */
.workers-section .worker-table {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Download Badge Styles */
.download-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #495057;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.download-badge:hover {
    background-color: #e9ecef;
    color: #212529;
    text-decoration: none;
}

.download-badge i {
    margin-right: 5px;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.download-badge:hover i {
    transform: translateY(-1px);
}

.download-badge.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Project Header Styles */
.project-header-content {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

.project-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.project-title-and-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

/* Icon Styles */
.dashboard-title i,
.stats-card i,
.action-button i,
.dashboard-card-header i {
    color: var(--primary-color);
    opacity: 0.9;
}

.stats-card i {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
}

.action-button i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.action-button:hover i {
    transform: scale(1.1);
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Table Row Hover Effect */
.worker-row:hover td {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Table Icon Styles */
.dashboard-table th i {
    color: var(--secondary-color);
    margin-right: 5px;
    font-size: 0.9em;
}

/* Footer Icon Styles */
.footer-section h4 i {
    color: var(--primary-color);
}

.footer-section ul li i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

/* Worker Stats Icon Update */
.worker-stats i {
    margin-right: 5px;
    font-size: 0.9em;
}

.has-working i {
    color: white;
}

/* Modern Shadow Effects */
.dashboard-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Footer Section Update */
.footer-section {
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    height: 100%;
    transition: all 0.3s ease;
}

.footer-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.footer-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.footer-section ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.footer-section ul li a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .action-button {
        padding: 15px;
    }

    .action-button i {
        font-size: 1.5rem;
    }

    .stats-card {
        padding: 20px;
    }

    .stats-card h3 {
        font-size: 1rem;
    }

    .footer-section {
        padding: 20px;
        margin-bottom: 15px;
    }
}

/* Button Icon Colors */
.btn i {
    color: white;
}

.btn.btn-outline-primary i,
.btn.btn-outline-success i,
.btn.btn-outline-secondary i,
.btn.btn-outline-info i,
.btn.btn-outline-warning i,
.btn.btn-outline-danger i {
    color: currentColor;
}

.btn.btn-outline-primary:hover i,
.btn.btn-outline-success:hover i,
.btn.btn-outline-secondary:hover i,
.btn.btn-outline-info:hover i,
.btn.btn-outline-warning:hover i,
.btn.btn-outline-danger:hover i {
    color: white;
}

/* Ensure download badge icons stay themed */
.download-badge i {
    color: var(--secondary-color);
}

.download-badge:hover i {
    color: var(--dark-color);
}

/* Keep action button icons themed */
.action-button i {
    color: var(--primary-color);
}

/* Keep footer icons themed */
.footer-section i {
    color: var(--secondary-color);
}

.footer-section h4 i {
    color: var(--primary-color);
}

/* Keep stats card icons white */
.stats-card i {
    color: white !important;
}

/* Keep worker stats icons white when active */
.worker-stats.has-working i {
    color: white !important;
}

/* Quick Range Buttons */
.quick-range-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-range-buttons .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Dashboard Card Table Styles */
.dashboard-card .table {
    margin-bottom: 0;
}

.dashboard-card .table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.dashboard-card .table td {
    vertical-align: middle;
}

.dashboard-card .btn-primary {
    margin-bottom: 1rem;
}

/* First Nations Statistics Table */
.dashboard-card .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.dashboard-card .table-responsive {
    margin: -20px;
    padding: 20px;
    width: calc(100% + 40px);
}

/* First Nations Statistics Progress Bars */
.rating-progress-container,
.attendance-progress-container {
    width: 100%;
    height: 28px;
    background-color: #f8f9fa;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.rating-progress-bar,
.attendance-progress-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.rating-text,
.attendance-text {
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.2),
        1px -1px 0 rgba(0,0,0,0.2),
        -1px 1px 0 rgba(0,0,0,0.2),
        1px 1px 0 rgba(0,0,0,0.2);
    z-index: 1;
}

/* First Nations Table Styles */
#firstNationsTable th {
    white-space: nowrap;
    padding: 1rem;
}

#firstNationsTable td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Make the progress bar columns wider */
#firstNationsTable th:nth-child(3),
#firstNationsTable th:nth-child(4),
#firstNationsTable td:nth-child(3),
#firstNationsTable td:nth-child(4) {
    width: 25%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rating-progress-container,
    .attendance-progress-container {
        height: 24px;
    }

    .rating-text,
    .attendance-text {
        font-size: 0.75rem;
    }
}

/* Dedicated Workers Section */
.worker-actions .btn-group {
    display: flex;
    gap: 0.5rem;
}

.worker-actions .btn-group .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    white-space: nowrap;
}

/* Recent Applications Section */
.dashboard-card-header .btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

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

.dashboard-table .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    white-space: nowrap;
}

/* Ensure all action buttons have consistent height */
.btn-sm {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    white-space: nowrap;
}

/* Date Range Picker Styles */
.date-range-picker {
    margin-top: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.date-input-container {
    width: 100%;
}

.date-input-container .form-control {
    height: 38px;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: 100%;
}

.quick-range-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.quick-range-buttons .btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .quick-range-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .quick-range-buttons .btn {
        width: 100%;
        min-width: unset;
    }
}

/* Analytics Dashboard Header */
.dashboard-card .dashboard-card-header {
    padding: 1.25rem;
    border-bottom: none;
}

.dashboard-card .dashboard-card-header .gap-2 {
    gap: 0.75rem !important;
}

.dashboard-card .dashboard-card-header .btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-card .dashboard-card-header .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-card .dashboard-card-header .btn i {
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* Table Row Action Buttons - Highly Specific */
.dashboard-table .table-actions {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.dashboard-table .table-actions .btn {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    max-width: none !important;
    width: auto !important;
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-width: 1px !important;
}

/* Specific button styles for table actions */
.dashboard-table .table-actions .btn-info {
    background-color: var(--info-color) !important;
    border-color: var(--info-color) !important;
    color: white !important;
}

.dashboard-table .table-actions .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.dashboard-table .table-actions .btn-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
}

/* Override any Bootstrap or conflicting styles */
.dashboard-table .table-actions .btn.btn-info,
.dashboard-table .table-actions .btn.btn-primary,
.dashboard-table .table-actions .btn.btn-success {
    height: 32px !important;
    line-height: 1 !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

/* Ensure icons in these buttons are aligned */
.dashboard-table .table-actions .btn i {
    font-size: 1rem !important;
    margin-right: 0.25rem !important;
    line-height: 1 !important;
    position: relative !important;
    top: 0 !important;
}

/* Remove margin from last icon */
.dashboard-table .table-actions .btn i:last-child {
    margin-right: 0 !important;
}

/* Hover states for table action buttons */
.dashboard-table .table-actions .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Recent Applications Action Buttons - Highly Specific */
.dashboard-card .recent-applications-actions {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.dashboard-card .recent-applications-actions .btn {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    max-width: none !important;
    width: auto !important;
    height: 38px !important;
    padding: 0 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-width: 1px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

/* Specific button styles for recent applications actions */
.dashboard-card .recent-applications-actions .btn-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
}

.dashboard-card .recent-applications-actions .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Override any Bootstrap or conflicting styles */
.dashboard-card .recent-applications-actions .btn.btn-success,
.dashboard-card .recent-applications-actions .btn.btn-primary {
    height: 38px !important;
    line-height: 1 !important;
    padding: 0 1rem !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

/* Ensure icons in these buttons are aligned */
.dashboard-card .recent-applications-actions .btn i {
    font-size: 1rem !important;
    margin-right: 0.25rem !important;
    line-height: 1 !important;
    position: relative !important;
    top: 0 !important;
}

/* Remove margin from last icon */
.dashboard-card .recent-applications-actions .btn i:last-child {
    margin-right: 0 !important;
}

/* Hover states for recent applications action buttons */
.dashboard-card .recent-applications-actions .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Analytics Dashboard Header Buttons - Highly Specific */
.dashboard-card .dashboard-card-header .gap-2 {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.dashboard-card .dashboard-card-header .gap-2 .btn {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    max-width: none !important;
    width: auto !important;
    height: 38px !important;
    padding: 0 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-width: 1px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

/* Specific button styles for analytics header */
.dashboard-card .dashboard-card-header .gap-2 .btn-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
}

.dashboard-card .dashboard-card-header .gap-2 .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Profile/History Button Group - Highly Specific */
.worker-actions {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.worker-actions .btn-group {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
}

.worker-actions .btn-group .btn {
    flex: 1 1 auto !important;
    min-width: 80px !important;
    max-width: none !important;
    width: auto !important;
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-width: 1px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    border-radius: 0.5rem !important;
}

/* Specific button styles for profile/history buttons */
.worker-actions .btn-group .btn-info {
    background-color: var(--info-color) !important;
    border-color: var(--info-color) !important;
    color: white !important;
}

.worker-actions .btn-group .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Override any Bootstrap or conflicting styles */
.worker-actions .btn-group .btn.btn-info,
.worker-actions .btn-group .btn.btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    height: 32px !important;
    line-height: 1 !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Ensure icons in these buttons are aligned */
.worker-actions .btn-group .btn i {
    font-size: 1rem !important;
    margin-right: 0.25rem !important;
    line-height: 1 !important;
    position: relative !important;
    top: 0 !important;
}

/* Remove margin from last icon */
.worker-actions .btn-group .btn i:last-child {
    margin-right: 0 !important;
}

/* Hover states for profile/history buttons */
.worker-actions .btn-group .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
} 