.top-workers-table {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(2, 1, 128, 0.04);
    max-width: 950px;
    margin: 40px auto 0 auto;
    padding: 0 0 24px 0;
    font-size: 1rem;
}
.top-workers-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 100px;
}

.top-workers-header p {
    font-size: 1.1rem;
    padding: 2%;
}

.tw-header,
.tw-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 32px;
    font-weight: 500;
}

.tw-header {
    background: #f3f4f6;
    font-size: 1.06rem;
    letter-spacing: 0.02em;
    color: #020180;
}

.tw-row {
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.tw-row:hover {
    background: #f1f6ff;
}

.tw-col {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tw-col.name {
    flex: 2;
}
.tw-col.actions {
    flex: 0.5;
    text-align: right;
}

.tw-dropdown-btn {
    background: none;
    border: none;
    color: #020180;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s;
    margin-left: 10px;
}

.tw-dropdown-btn.open {
    transform: rotate(180deg);
}

.tw-dropdown {
    display: none;
    background: #f7faff;
    padding: 0 32px 18px 32px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tw-dropdown-content {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 0;
}

.tw-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #e5e7eb;
    box-shadow: 0 2px 8px rgba(2, 1, 128, 0.08);
    margin-top: 16px;
}

.tw-profile-info {
    flex: 1;
    margin-top: 16px;
}

.tw-profile-info strong {
    font-size: 1.15rem;
    color: #020180;
}

.tw-profile-info p {
    margin: 10px 0 18px 0;
    color: #222;
    font-size: 1rem;
}

.tw-profile-actions {
    display: flex;
    gap: 14px;
}

.tw-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.98rem;
    text-decoration: none;
    border: none;
    transition: background 0.2s, color 0.2s;
}

.tw-view-profile {
    background: #020180;
    color: #fff;
}

.tw-view-profile:hover {
    background: #678fff;
}

.tw-add-fav {
    background: #b1bad1;
    color: #000;
}

.tw-add-fav:hover {
    background: #678fff;
    color: #fff;
}

.tw-view-more {
    background: #020180;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 32px;
    font-size: 1rem;
    margin-top: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.tw-view-more:hover {
    background: #678fff;
}

/* Responsive */
@media (max-width: 700px) {
    .top-workers-table {
        padding: 0 0 10px 0;
    }
    .tw-header,
    .tw-row,
    .tw-dropdown {
        padding: 12px 8px;
        font-size: 0.97rem;
    }
    .tw-dropdown-content {
        flex-direction: column;
        gap: 12px;
    }
    .tw-profile-img {
        margin-top: 0;
    }
    
}

/* Worker Row Stars */
.tw-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
    cursor: pointer;
}

.tw-row:hover {
    background-color: #f8f9fa;
}

.tw-col {
    flex: 1;
}

.stars i.fas,
.stars i.far {
    color: #ffc107;
    /* Bright yellow */
}

/* Rating stars */
.stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
}

.stars i {
    margin-right: 2px;
}

.stars small {
    margin-left: 5px;
    font-size: 12px;
    color: #888;
}

/* Dropdown styles */
.tw-dropdown {
    display: none;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.tw-dropdown-content {
    display: flex;
    gap: 15px;
}

.tw-profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.tw-profile-info {
    flex: 1;
}

.tw-profile-actions {
    margin-top: 5px;
}

.tw-btn.tw-view-profile {
    padding: 6px 12px;
    font-size: 13px;
    background-color: var(--primary-orange);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.tw-btn.tw-view-profile:hover {
    background-color: #0056b3;
}

/* Dropdown toggle */
.tw-dropdown-btn {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    transition: transform 0.3s;
}

.tw-dropdown-btn.open {
    transform: rotate(180deg);
}

/* Modal Styles - Remove backdrop */
.modal-backdrop {
    display: none !important;
}

.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    max-width: 600px;
    width: 90%;
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background-color: var(--primary-orange);
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
    font-size: 18px;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.btn-close {
    filter: brightness(0) invert(1);
}

.review-item {
    padding: 12px 15px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-orange);
    background-color: #f8f9fa;
    border-radius: 5px;
}

.review-item strong {
    color: var(--primary-orange);
    font-size: 15px;
    display: block;
    margin-bottom: 6px;
}

.review-item p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.review-stars {
    margin: 5px 0;
}

.review-stars i {
    color: #ffc107;
    font-size: 13px;
}

.review-date {
    color: #999;
    font-size: 11px;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Top Workers Table - Card Style for all screens */
.top-workers-table {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(2, 1, 128, 0.04);
    max-width: 950px;
    margin: 40px auto 0 auto;
    padding: 16px;
    font-size: 1rem;
}

/* Worker Cards */
.tw-row {
    display: flex;
    flex-direction: column; /* stacked vertically like mobile */
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: background 0.2s, box-shadow 0.2s;
}

.tw-row:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(2, 1, 128, 0.08);
}

/* Worker Info Columns */
.tw-col {
    flex: 1 1 100%;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* allow wrapping */
}

.tw-col.name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #020180;
}

.tw-col.hire-rate {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars i {
    color: #ffc107;
}

.stars small {
    font-size: 12px;
    color: #888;
}

/* Location & Industry */
.tw-col.location,
.tw-col.industry {
    font-size: 0.95rem;
    color: #555;
}

/* Dropdown Button */
.tw-dropdown-btn {
    align-self: flex-start;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: transform 0.3s;
}

.tw-dropdown-btn.open {
    transform: rotate(180deg);
}

/* Dropdown Details */
.tw-dropdown {
    display: none;
    flex-direction: column;
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

.tw-dropdown-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.tw-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #e5e7eb;
}

.tw-profile-info strong {
    font-size: 1rem;
    color: #020180;
}

.tw-profile-info p {
    font-size: 0.95rem;
    color: #333;
    margin: 6px 0;
}

.tw-profile-actions .tw-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* View More Button */
.tw-view-more {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 16px auto 0 auto;
    padding: 10px 20px;
    font-size: 1rem;
    background: #020180;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.tw-view-more:hover {
    background: #678fff;
}

/* Modal Styling (kept mobile-friendly) */
.modal-dialog {
    width: 95%;
    max-width: 500px;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 15px;
}

/* Reviews */
.review-item {
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #020180;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.review-item strong {
    color: #020180;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: block;
}

.review-item p {
    font-size: 0.9rem;
    margin: 4px 0;
}

.review-stars i {
    font-size: 12px;
    color: #ffc107;
}

/* Remove table layout on desktop - card layout applied universally */
.tw-header {
    display: none; /* Hide header for card-style layout */
}

}

@media (max-width: 360px) {
    .modal-dialog {
        width: 98%;
        max-width: 340px;
    }

    .modal-title {
        font-size: 13px;
    }

    .modal-body {
        max-height: 60vh;
        padding: 10px;
    }

    .review-item {
        padding: 6px 8px;
    }

    .review-item strong {
        font-size: 12px;
    }

    .review-item p {
        font-size: 11px;
    }
}


