/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: #fff;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
}

.tab-button.active {
    background: #007bff;
    color: white;
}

#content-container {
    height: calc(100vh - 60px);
    overflow: auto;
}

#content-frame {
    width: 100%;
    height: 100vh;
    border: none;
    overflow: auto;
}

/* Your existing styles here */

.project-management {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.add-project-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.add-project-form input,
.add-project-form .market-search-container input {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 42px;
    box-sizing: border-box;
}

.add-project-form button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    height: 42px;
    white-space: nowrap;
}

.project-controls {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.project-controls input {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.project-controls input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

.sort-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sort-controls button {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    color: #495057;
}

.sort-controls button:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.project-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.project-header h4 {
    margin: 0;
    color: #212529;
    font-size: 18px;
    font-weight: 600;
}

.project-id {
    color: #6c757d;
    font-size: 0.9em;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.project-details {
    margin: 15px 0;
}

.project-details p {
    margin: 8px 0;
    color: #495057;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.project-details strong {
    color: #343a40;
}

.project-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    justify-content: center;
}

.project-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    min-width: 70px;
}

.project-actions button:first-child {
    background: #007bff;
    color: white;
}

.project-actions button:first-child:hover {
    background: #0056b3;
}

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

.project-actions .delete-btn:hover {
    background: #c82333;
}

.project-actions button:last-child {
    background: #6c757d;
    color: white;
}

.project-actions button:last-child:hover {
    background: #5a6268;
}

.market-management {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.add-market-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.add-market-form input {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

.add-market-form button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    height: 42px;
    white-space: nowrap;
}

.add-market-form button:hover {
    background: #0056b3;
}

.market-controls {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.market-controls input {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.market-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.market-header {
    margin-bottom: 15px;
}

.market-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.market-details {
    margin-bottom: 15px;
}

.market-details p {
    margin: 8px 0;
    color: #666;
}

.market-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    justify-content: center;
}

.market-actions button {
    /*flex: 1;*/
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    min-width: 70px;
    color: white;
}

.market-actions .edit-btn {
    background: #007bff;
}

.market-actions .edit-btn:hover {
    background: #0056b3;
}

.market-actions .delete-btn {
    background: #dc3545;
}

.market-actions .delete-btn:hover {
    background: #c82333;
}

.market-actions .schedule-btn {
    background: #6c757d;
}

.market-actions .schedule-btn:hover {
    background: #5a6268;
}

/* Calendar styles */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendar-day {
    min-height: 120px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: auto;
}

.assignments-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.assignment {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px 0;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 24px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.assignment-start {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    margin-right: 0;
    border-right: none;
}

.assignment-middle {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-left: none;
    border-right: none;
}

.assignment-end {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-left: 0;
    border-left: none;
}

.start-icon, .end-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: bold;
}

.start-icon {
    left: 4px;
}

.end-icon {
    right: 4px;
}

.assignment-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.assignment-middle .assignment-text {
    visibility: hidden;
}

.assignment-end .assignment-text {
    visibility: visible !important;
    text-align: center;
    padding: 0 20px;
}

/* Ensure PTO styling doesn't override text visibility */
.assignment.pto .assignment-text {
    visibility: visible !important;
}

.highlighted {
    background: #2196F3 !important;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

.date-label {
    font-weight: bold;
    margin-bottom: 5px;
    padding: 2px;
    border-radius: 4px;
    background: #f8f9fa;
}

.assignment-start {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    padding-left: 8px;
}

.assignment-end {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    padding-right: 8px;
}

.assignment-middle {
    border-radius: 0;
}

.start-icon, .end-icon {
    font-size: 10px;
    position: absolute;
}

.start-icon {
    left: 2px;
}

.end-icon {
    right: 2px;
}

.assignment-text {
    margin-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Highlighted assignments */
.assignment.highlighted {
    background: #2196F3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

.calendar-header {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.empty-day {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}

.date-range span {
    text-align: center;
    color: #666;
}

.controls {
    margin: 20px;
}

.search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-container input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-details {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.search button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search button:hover {
    background: #0056b3;
}

.search button:last-child {
    background: #6c757d;
}

.search button:last-child:hover {
    background: #5a6268;
}

.assignment.pto {
    background: #ffcdd2;
}

.project-stat {
    margin: 10px;
    padding: 10px;
    border: 1px solid #ccc;
}

/* Add these styles for search results highlighting and modal */
.assignment.highlighted {
    background: #ffd700;
    border: 2px solid #ff8c00;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.search-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.results-table thead {
    background: #f5f5f5;
}

.results-table tr:nth-child(even) {
    background: #f9f9f9;
}

/* Employee Management Styles */
.employee-management {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.add-employee-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-employee-form .form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: start;
}

.add-employee-form input:not([type="color"]) {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

.add-employee-form .color-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-employee-form .color-input-group input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 2px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.add-employee-form .add-btn {
    grid-column: span 3;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.add-employee-form .add-btn:hover {
    background: #0056b3;
}

/* PTO Settings Styles */
.pto-settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-setting-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.color-setting-group label {
    font-weight: 500;
}

.color-setting-group input[type="color"] {
    padding: 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    height: 36px;
    background: white;
}

.color-setting-group .save-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.color-setting-group .save-btn:hover {
    background: #5a6268;
}

.color-setting-group small {
    color: #6c757d;
    flex-basis: 100%;
    margin-top: 5px;
}

.employee-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.employee-controls input {
    flex: 1;
    min-width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sort-controls {
    display: flex;
    gap: 10px;
}

.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.employee-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.employee-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.employee-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.employee-details {
    margin: 15px 0;
}

.employee-details p {
    margin: 8px 0;
    color: #666;
}

.employee-details p strong {
    color: #333;
    margin-right: 5px;
}

.employee-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.employee-actions button {
    /* padding: 8px 16px; */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

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

.employee-actions .edit-btn:hover {
    background: #0056b3;
}

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

.employee-actions .delete-btn:hover {
    background: #c82333;
}

.employee-actions .schedule-btn {
    background: #6c757d;
    color: white;
}

.employee-actions .schedule-btn:hover {
    background: #5a6268;
}

.employee-item.inactive {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.employee-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.employee-search-container {
    position: relative;
    width: 100%;
}

.employee-search-container input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-result-item:hover {
    background: #f5f5f5;
}

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

.search-result-item .employee-details {
    font-size: 0.8em;
    color: #666;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #212529;
}

.close-modal {
    font-size: 24px;
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
}

.close-modal:hover {
    color: #343a40;
}

.edit-form-group {
    margin-bottom: 20px;
}

.edit-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
}

.edit-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.edit-form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

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

.save-btn:hover {
    background: #0056b3;
}

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

.cancel-btn:hover {
    background: #5a6268;
}

.assignments-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.assignments-table th,
.assignments-table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.assignments-table th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.assignments-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.assignments-table tr:hover {
    background-color: #f2f2f2;
}

.delete-assignment-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

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

/* Update the assignments table to accommodate the new column */
.assignments-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.assignments-table td:last-child {
    text-align: center;
    width: 80px;
}

.assignment-management {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.add-assignment-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-assignment-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
}

.add-assignment-form input,
.add-assignment-form select,
.add-assignment-form .employee-search-container input {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    grid-column: span 2;
}

.date-range span {
    color: #495057;
    font-size: 14px;
}

.add-assignment-form button.add-btn {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    height: 42px;
    grid-column: span 2;
    transition: background-color 0.2s;
}

.add-assignment-form button.add-btn:hover {
    background: #0056b3;
}

/* Update assignment controls to match project controls */
.assignment-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.assignment-controls input {
    flex: 1;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.assignment-controls .sort-controls {
    display: flex;
    gap: 10px;
}

.assignment-controls .sort-btn {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.assignment-controls .sort-btn:hover {
    background: #e9ecef;
}

/* Assignments Table */
.assignments-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.assignments-table {
    width: 100%;
    border-collapse: collapse;
}

.assignments-table th,
.assignments-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.assignments-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.assignments-table tr:hover {
    background: #f8f9fa;
}

.assignments-table .delete-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.assignments-table .delete-btn:hover {
    background: #c82333;
}

/* Search Results Dropdown */
.employee-search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

/* Market-specific search styles */
.market-search-container {
    position: relative;
    width: 100%;
}

.market-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.market-search-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.market-search-item:hover {
    background: #f5f5f5;
}

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

/* Update the existing market controls */
.market-controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

.market-controls input {
    flex: 1;
    min-width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-employee-form input[type="color"] {
    padding: 0;
    width: 50px;
    height: 38px;
    cursor: pointer;
}

/* Update assignment styles to handle custom colors */
.assignment {
    margin: 2px;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: opacity 0.2s;
}

.assignment:hover {
    opacity: 0.9;
}

.assignment.pto {
    background: #ffcdd2 !important;
    color: #000000 !important;
}

.color-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.edit-form-group input[type="color"] {
    padding: 0;
    width: 50px;
    height: 38px;
    cursor: pointer;
}

/* Update modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

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

.employee-item.inactive {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.employee-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.warning-text {
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 15px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.modal-body .assignments-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.modal-body .assignments-table th,
.modal-body .assignments-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.modal-body .assignments-table th {
    background-color: #f8f9fa;
}

.settings-management {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.calendar-settings {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-preference, .block-display-preference {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.color-preference label, .block-display-preference label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.color-preference select {
    width: 200px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.setting-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setting-option span {
    font-size: 14px;
    color: #495057;
}

.color-preference small, .block-display-preference small {
    display: block;
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 8px;
}

.backup-section {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.backup-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.export-section, .import-section {
    padding: 20px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.export-btn, .import-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.import-btn {
    background-color: #28a745;
}

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

.import-btn:hover {
    background-color: #218838;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.detail-group h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.detail-group p {
    margin: 5px 0;
    font-size: 0.9em;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.availability-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.availability-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.availability-bar span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 0.8em;
    font-weight: bold;
}

.fully-available {
    background-color: rgba(76, 175, 80, 0.1);
}

.partially-available {
    background-color: rgba(255, 152, 0, 0.1);
}

.not-available {
    background-color: rgba(244, 67, 54, 0.1);
}

.availability-fill {
    height: 100%;
    transition: width 0.3s ease;
}

tr.fully-available .availability-fill {
    background: #4CAF50;
}

tr.partially-available .availability-fill {
    background: #FF9800;
}

tr.not-available .availability-fill {
    background: #F44336;
}

.wide-modal .modal-content {
    max-width: 1400px;
    width: 95%;
}

.show-dates-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.show-dates-btn:hover {
    background: #0056b3;
}

.available-dates-detail {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    min-width: 300px;
    overflow-y: auto;
    right: 100%;
    top: 0;
    margin-right: 10px;
    columns: 2;
    column-gap: 20px;
}

.available-dates-detail h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    column-span: all;
}

.date-item {
    margin-bottom: 5px;
    break-inside: avoid;
    padding: 2px 0;
}

.hidden {
    display: none;
}

.assignments-table td {
    position: relative;
}

/* Make the table columns more proportional */
.assignments-table th,
.assignments-table td {
    padding: 12px 15px;
    white-space: nowrap;
}

.assignments-table td:last-child {
    min-width: 120px;
    position: relative;
}

.appearance-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-settings {
    margin-top: 15px;
}

.color-setting-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.color-setting-group label {
    min-width: 120px;
}

.color-setting-group input[type="color"] {
    padding: 0;
    width: 50px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.save-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.save-btn:hover {
    background: #0056b3;
}

.pto-settings {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pto-settings small {
    display: block;
    margin-top: 8px;
    color: #666;
}

.project-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.color-input-group label {
    min-width: 100px;
}

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

.project-card {
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-project-form input[type="color"],
.edit-form-group input[type="color"] {
    padding: 0;
    width: 50px;
    height: 38px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.color-input-group label {
    white-space: nowrap;
    margin: 0;
}

.color-input-group input[type="color"] {
    padding: 0;
    width: 50px;
    height: 30px;
}

.add-project-form input[type="color"] {
    padding: 0;
    width: 60px;
    height: 42px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.add-project-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}


.add-project-form input[type="color"] {
    padding: 2px;
    width: 60px;
    height: 42px;
    cursor: pointer;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.color-input-group label {
    white-space: nowrap;
}

.sort-btn {
    position: relative;
    padding-right: 25px; /* Make room for the icon */
}

.sort-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.sort-controls button {
    margin-right: 10px;
    padding: 8px 30px 8px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.sort-controls button:hover {
    background: #e0e0e0;
}

/* Update modal content styling */
.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 1000px; /* Increased to match add project form width */
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Update edit form styling to match add project form */
.edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.edit-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-form-group input {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

.edit-form-group input[type="color"] {
    padding: 0;
    width: 60px;
    height: 42px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}
.edit-form-group label {
    font-size: 14px;
    color: #495057;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.modal-actions .save-btn {
    background: #007bff;
    color: white;
}

.modal-actions .cancel-btn {
    background: #6c757d;
    color: white;
}

.modal-actions button:hover {
    opacity: 0.9;
}
.project-search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

/* Calendar container styles */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Calendar day cell styles */
.calendar-day {
    min-height: 120px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: auto;
}

/* Assignment styles within calendar */
.assignment {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px 0;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 24px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Calendar header styles */
.calendar-header {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Date label styles */
.date-label {
    font-weight: bold;
    margin-bottom: 5px;
    padding: 2px;
    border-radius: 4px;
    background: #f8f9fa;
}

/* Empty day styles */
.empty-day {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
}

/* Assignment text styles */
.assignment-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Scrollbar styles for calendar days with many assignments */
.calendar-day {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.calendar-day::-webkit-scrollbar {
    width: 6px;
}

.calendar-day::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.calendar-day::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

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

/* Calendar Controls Styling */
.calendar-controls {
    margin-bottom: 30px;
}

.search-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: start;
}

.search-grid .date-range {
    grid-column: span 2;
}

.search-grid .button-group {
    grid-column: span 3;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.search-grid input,
.search-grid select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

.search-grid .primary-btn,
.search-grid .secondary-btn,
.search-grid .clear-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.search-grid .primary-btn {
    background: #007bff;
    color: white;
}

.search-grid .primary-btn:hover {
    background: #0056b3;
}

.search-grid .secondary-btn {
    background: #6c757d;
    color: white;
}

.search-grid .secondary-btn:hover {
    background: #5a6268;
}

.search-grid .clear-btn {
    background: #dc3545;
    color: white;
}

.search-grid .clear-btn:hover {
    background: #c82333;
}

/* Month/Year selector styling */
.month-year-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 15px;
}

.month-year-selector select {
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.controls button {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.controls button:hover {
    background: #e9ecef;
}

.days-status {
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
    display: inline-block;
    margin: 4px 0;
}

.days-status strong {
    margin-right: 4px;
}

.employee-actions .status-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.employee-actions .status-btn.deactivate {
    background: #ffc107;
    color: black;
}

.employee-actions .status-btn.deactivate:hover {
    background: #e0a800;
}

.employee-actions .status-btn.activate {
    background: #28a745;
    color: white;
}

.employee-actions .status-btn.activate:hover {
    background: #218838;
}

/* Update employee card when inactive */
.employee-item.inactive {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.assignments-table .edit-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    transition: background-color 0.2s;
}

.assignments-table .edit-btn:hover {
    background: #0056b3;
}

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

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    /*max-width: 600px;*/
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #000;
}

.save-btn, .cancel-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

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

.save-btn:hover {
    background: #0056b3;
}

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

.cancel-btn:hover {
    background: #545b62;
}

.edit-form-group {
    margin-bottom: 15px;
}

.edit-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.edit-form-group input,
.edit-form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-range input {
    flex: 1;
}

.date-range span {
    color: #666;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}