/* Multi-select components */
.floating-multi-select,
.search-multi-select-container {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.multi-select-container {
  position: relative;
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--white);
  transition: var(--btn-transition);
}

.multi-select-container:hover {
  border-color: var(--primary);
}

.multi-select-container.error {
  border-color: var(--danger);
}

.multi-select-container.success {
  border-color: var(--success);
}

/* Floating multi-select trigger */
.multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  cursor: pointer;
  min-height: 48px;
}

.multi-select-selected-display {
  flex: 1;
}

.multi-select-placeholder {
  color: var(--text-muted);
  font-size: var(--font-size-base);
}


.multi-select-selected-items:empty {
  display: none;
}

.multi-select-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--primary);
  color: var(--text-white);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
}

.multi-select-pill-remove {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--border-radius-full);
  transition: var(--btn-transition);
}

.multi-select-pill-remove:hover {
  background: rgba(255, 255, 255, 0.2);
}

.multi-select-arrow {
  color: var(--text-muted);
  transition: transform var(--btn-transition);
}

.multi-select-container.active .multi-select-arrow {
  transform: rotate(180deg);
}

/* Floating multi-select dropdown */
.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: var(--border-width-thick) solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.multi-select-options {
  padding: var(--spacing-xs);
}

.multi-select-option {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: var(--btn-transition);
}

.multi-select-option:hover {
  background: var(--hover-bg);
}

.multi-select-checkbox {
  display: none;
}

.multi-select-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  width: 100%;
}

.checkbox-icon {
  width: 20px;
  height: 20px;
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--btn-transition);
}

.multi-select-checkbox:checked + .multi-select-label .checkbox-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

.multi-select-checkbox:checked + .multi-select-label .checkbox-icon i {
  display: block;
}

.checkbox-icon i {
  display: none;
  width: 12px;
  height: 12px;
}

/* Search multi-select specific styles */
.multi-select-header {
  padding: var(--spacing-md);
}

.multi-select-selected-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.multi-select-selected-pills:empty {
  margin-bottom: 0;
}

.search-multi-select-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-multi-select-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--font-size-base);
  background: transparent;
  padding: 0;
}

.search-multi-select-input::placeholder {
  color: var(--text-muted);
}


/* Floating labels for multi-select */
.floating-multi-select .floating-label,
.search-multi-select-container .floating-label {
  position: absolute;
  top: -10px;
  left: var(--spacing-md);
  background: var(--white);
  padding: 0 var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--primary);
  font-weight: 500;
  z-index: 1;
}

/* Modal form styles */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.modal-form label {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: var(--spacing-xs);
}


.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

/* Global text field and dropdown styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
  padding: var(--spacing-md);
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-base);
  transition: var(--btn-transition);
  background: var(--white);
  color: var(--gray-600) !important;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
input[type="date"]:hover,
input[type="datetime-local"]:hover,
input[type="time"]:hover,
select:hover,
textarea:hover {
  border-color: var(--primary);
}

/* Enhanced focus styles */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Ensure select elements match text inputs exactly */
select {
  color: var(--gray-600) !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Floating label inputs */
.floating-label {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.floating-label input,
.floating-label select,
.floating-label textarea {
  width: 100%;
  min-width: var(--size-200);
  padding: var(--spacing-md);
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-base);
  font-family: var(--font-family-primary);
  background: var(--white);
  color: var(--text-color);
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.floating-label textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 400px;
  overflow-y: hidden;
  transition: height 0.1s ease;
}

.floating-label input:hover,
.floating-label select:hover,
.floating-label textarea:hover {
  border-color: var(--primary);
}

.floating-label input:focus,
.floating-label select:focus,
.floating-label textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.floating-label label {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  color: var(--text-muted);
  font-size: var(--font-size-base);
  font-weight: normal;
  pointer-events: none;
  transition: var(--transition-fast);
  padding: 0 var(--spacing-xs);
  margin: 0;
    max-width:85%;
}

.floating-label input:not(:placeholder-shown) + label,
.floating-label select:not([value=""]) + label,
.floating-label.has-value > label,
.floating-label input:focus + label,
.floating-label select:focus + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--font-size-xs);
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

.floating-label textarea + label {
  top: var(--spacing-xl);
  transform: none;
}

.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%);
}

/* Validation states for floating labels */
.floating-label input.error,
.floating-label select.error,
.floating-label textarea.error {
  border-color: var(--danger);
  background: var(--danger-light);
}

.floating-label input.error:focus + label,
.floating-label input.error:not(:placeholder-shown) + label,
.floating-label select.error:focus + label,
.floating-label select.error:not([value=""]) + label,
.floating-label textarea.error:focus + label,
.floating-label textarea.error:not(:placeholder-shown) + label {
  color: var(--danger);
}

.floating-label input.success,
.floating-label select.success,
.floating-label textarea.success {
  border-color: var(--success);
  background: var(--success-light);
}

.floating-label input.success:focus + label,
.floating-label input.success:not(:placeholder-shown) + label,
.floating-label select.success:focus + label,
.floating-label select.success:not([value=""]) + label,
.floating-label textarea.success:focus + label,
.floating-label textarea.success:not(:placeholder-shown) + label {
  color: var(--success);
}

.floating-label input:disabled,
.floating-label select:disabled,
.floating-label textarea:disabled {
  background: var(--white);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: var(--text-muted);
}

.floating-label input:disabled + label,
.floating-label select:disabled + label,
.floating-label textarea:disabled + label,
.floating-label input[readonly] + label,
.floating-label select[readonly] + label,
.floating-label textarea[readonly] + label,
.floating-label input[data-is-catalogue-item="true"] + label,
.floating-label select[data-is-catalogue-item="true"] + label,
.floating-label textarea[data-is-catalogue-item="true"] + label {
  color: var(--text-muted);
}

/* Disabled container - prevent hover effects */
.floating-label.disabled input:hover,
.floating-label.disabled select:hover,
.floating-label.disabled textarea:hover {
  border-color: var(--border-color);
  cursor: default;
}

/* Prevent focus border on disabled/readonly fields */
.floating-label input:disabled:focus,
.floating-label select:disabled:focus, 
.floating-label textarea:disabled:focus,
.floating-label input[readonly]:focus,
.floating-label select[readonly]:focus,
.floating-label textarea[readonly]:focus,
.floating-label input[data-is-catalogue-item="true"]:focus,
.floating-label select[data-is-catalogue-item="true"]:focus,
.floating-label textarea[data-is-catalogue-item="true"]:focus {
  border-color: var(--border-color) !important;
}

/* Remove grey background from readonly and catalogue fields */
.floating-label input[readonly],
.floating-label select[readonly],
.floating-label textarea[readonly],
.floating-label input[data-is-catalogue-item="true"],
.floating-label select[data-is-catalogue-item="true"],
.floating-label textarea[data-is-catalogue-item="true"] {
  background: var(--white);
}

/* Floating Select Arrow Styling */
.floating-select-arrow {
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  transform-origin: center;
  pointer-events: none;
  color: var(--text-muted);
  transition: var(--transition-fast);
  z-index: 1;
}

.floating-label select:focus + label + .floating-select-arrow {
  color: var(--primary);
}

.floating-label select:hover + label + .floating-select-arrow {
  color: var(--primary);
}

.floating-label select:disabled + label + .floating-select-arrow,
.floating-label select[readonly] + label + .floating-select-arrow,
.floating-label select[data-is-catalogue-item="true"] + label + .floating-select-arrow {
  display: none;
}

.floating-select-arrow i {
  width: 16px;
  height: 16px;
}

/* Arrow rotation when select dropdown is open */
.floating-label.open .floating-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Search Select Custom Dropdown Styling */
.search-select-container {
  position: relative;
  transition: padding-bottom 0.3s ease-in-out;
}

.search-select-container .floating-label {
  position: relative;
}

.search-dropdown-arrow {
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  transform-origin: center;
  pointer-events: none;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.search-select-input:focus ~ .search-dropdown-arrow {
  color: var(--primary);
}

.search-dropdown-arrow i {
  width: 16px;
  height: 16px;
}

/* Fix positioning for search-multi-select chevron */
.search-multi-select-container .search-dropdown-arrow {
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  transform-origin: center;
  pointer-events: none;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.search-multi-select-container .search-multi-select-input:focus ~ .search-dropdown-arrow {
  color: var(--primary);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
  display: none;
}

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

.search-dropdown-list {
  padding: var(--spacing-xs) 0;
}

.search-dropdown-option {
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-color);
  font-size: var(--font-size-base);
  border-bottom: var(--border-width-thin) solid var(--gray-100);
}

.search-dropdown-option:last-child {
  border-bottom: none;
}

.search-dropdown-option:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.search-dropdown-option.highlighted {
  background: var(--primary);
  color: var(--white);
}

.search-dropdown-option.no-results {
  color: var(--text-muted);
  font-style: italic;
  cursor: default;
}

.search-dropdown-option.no-results:hover {
  background: transparent;
  color: var(--text-muted);
}

/* Ensure dropdown appears above other form elements */
.search-select-container.open .search-dropdown {
  display: block;
}

/* Arrow rotation when dropdown is open */
.search-select-container.open .search-dropdown-arrow,
.search-multi-select-container.open .search-dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Multi-select with options pill styles */
.multi-select-selected-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.multi-select-selected-items:empty {
  display: none;
}

.multi-select-item {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  min-height: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: var(--transition-fast);
}

.multi-select-item:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.multi-select-item-name {
  font-weight: 500;
  margin-right: var(--spacing-sm);
  white-space: nowrap;
}

.multi-select-item-options {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-right: var(--spacing-sm);
}

.multi-select-item-field {
  position: relative;
}

.multi-select-item-input {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-sm);
  color: var(--white);
  font-size: var(--font-size-sm);
  padding: 2px var(--spacing-xs);
  min-width: 80px;
  transition: var(--transition-fast);
}

.multi-select-item-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.multi-select-item-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Select dropdown styling within pills */
.multi-select-item-input[type="text"] {
  min-width: 60px;
}

.multi-select-item select.multi-select-item-input {
  appearance: none;
  background: var(--white);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding-right: 20px;
  cursor: pointer;
}

.multi-select-item select.multi-select-item-input:focus {
  background: var(--white);
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.multi-select-item select.multi-select-item-input option {
  background: var(--white);
  color: var(--text-primary);
}

.multi-select-item-remove {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: var(--border-radius-full);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: var(--spacing-xs);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.multi-select-item-remove:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.multi-select-item-remove svg {
  width: 12px;
  height: 12px;
}

/* Responsive design for pills */
@media (max-width: 768px) {
  .multi-select-item {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--spacing-sm);
    min-height: auto;
  }
  
  .multi-select-item-name {
    margin-bottom: var(--spacing-xs);
    margin-right: 0;
  }
  
  .multi-select-item-options {
    margin-right: 0;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
  }
  
  .multi-select-item-remove {
    align-self: flex-end;
    margin-left: 0;
  }
}

.staff-availability-section,
.profit-centre-data-section {
  margin-bottom: var(--spacing-xl);
}

.staff-availability-section {
  width: var(--size-340);
}

.staff-availability-section h3,
.profit-centre-data-section h3 {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}


/* Checkbox Label Styles for Hidden Projects Modal */
.modal-form .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: var(--font-weight-normal);
  color: var(--gray-600) !important;
}


.modal-form .checkbox-label input[type="checkbox"] {
  margin-top: var(--spacing-xs);
}

.breakdown-sections {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.breakdown-section {
  border: var(--border-width-thin) solid var(--border-color-light);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  background: var(--gray-25);
}

.breakdown-section h4 {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  border-bottom: var(--border-width-thin) solid var(--border-color-light);
  padding-bottom: var(--spacing-sm);
}

/* Breakdown table uses enhanced-table as base with minimal adjustments */
.breakdown-table.enhanced-table {
  min-width: var(--size-1200); /* Wider table for 16 columns */
}

.breakdown-table.enhanced-table th,
.breakdown-table.enhanced-table td {
  text-align: center; /* Center align numbers */
}

.breakdown-table.enhanced-table th:first-child,
.breakdown-table.enhanced-table .row-header {
  text-align: left; /* Left align row headers */
}

/* Row header styling */
.breakdown-table.enhanced-table .row-header {
  background: var(--gray-200);
  font-weight: var(--font-weight-semibold);
}

/* Capacity indicators */
.capacity-low {
  background: var(--success-bg);
  color: var(--success-text);
}

.capacity-medium {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.capacity-high {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Utilization indicators */
.utilization-row.utilization-low td {
  background: var(--success-bg);
  color: var(--success-text);
}

.utilization-row.utilization-medium td {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.utilization-row.utilization-high td {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Responsive breakdown design */
@media (max-width: 768px) {
  
  .breakdown-table.enhanced-table {
    min-width: var(--size-800); /* Still needs to be wide for 16 columns */
  }
}

/* Week Selector Panel Styles */
.week-selector-panel {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg);
  border: var(--border-width-thin) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--white);
}

.week-selector-panel .form-group {
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-md);
}

.week-selector-panel label {
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: 0;
  white-space: nowrap;
}

.week-selector-panel input[type="date"] {
  min-width: var(--size-160);
}

.week-selector-panel .form-text {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* Page Header with Week Navigation */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Week Navigation Styles */
.week-navigation {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.current-week-display {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  order: 2; /* Consolidated from duplicate definition */
}

.week-label {
  font-size: var(--font-size-xs);
  color: var(--primary);
  margin-bottom: var(--spacing-2xs);
  padding-bottom: var(--spacing-xs);
}

.week-date {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

/* Desktop: nav controls wrap around the date display */
.week-nav-controls {
  display: contents; /* Makes children behave as direct children of parent */
}

/* Desktop button positioning */
#prev-week-btn {
  order: 1;
}

/* Moved order property to main .current-week-display definition */

#next-week-btn {
  order: 3;
}

#this-week-btn {
  order: 4;
  margin-left: auto; /* Push reset button to the right on desktop */
}

/* Week navigation circular buttons - specific styling without overriding base .btn */
.week-nav-btn {
  width: var(--size-36);
  height: var(--size-36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: var(--border-radius-full);
}

/* Mobile responsive week navigation */
@media (max-width: 768px) {
  .week-navigation {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }
  
  .current-week-display {
    order: 1;
  }
  
  .week-nav-controls {
    display: flex; /* Override display: contents for mobile */
    order: 2;
    gap: var(--spacing-sm);
  }
  
  /* Reset button positioning for mobile */
  #prev-week-btn {
    order: 1;
  }
  
  #this-week-btn {
    order: 2;
    margin-left: 0; /* Remove auto margin on mobile */
  }
  
  #next-week-btn {
    order: 3;
  }
  
  /* Hide set priorities button on mobile to save space */
  #set-priorities-btn {
    display: none;
  }
}

/* Enhanced Projects Table Styles */
.enhanced-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  overflow: hidden;
  min-width: var(--size-1200);
}

.enhanced-table th {
  background: var(--gray-50);
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
  padding: var(--spacing-sm) var(--spacing-xs);
  text-align: left;
  border-bottom: var(--border-width-thick) solid var(--border-color);
  white-space: nowrap;
  font-size: var(--font-size-xs);
}

.enhanced-table td {
  padding: var(--spacing-xs);
  vertical-align: middle;
}

.enhanced-table tbody tr:hover {
  background: var(--gray-25);
}

.enhanced-table tbody tr:nth-child(even) {
  background: var(--gray-12);
}

.enhanced-table tbody tr:nth-child(even):hover {
  background: var(--gray-25);
}

/* Project code and description columns */
.enhanced-table .project-code {
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  min-width: var(--size-80);
}

.enhanced-table .project-description {
  max-width: var(--size-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category name column for profit centre data */
.enhanced-table .category-name {
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  min-width: var(--size-100);
  text-transform: capitalize;
}

/* Inline Editing Styles */
.foreman-cell {
  min-width: var(--size-120);
}

.labour-cell {
  min-width: var(--size-60);
}

.staff-cell {
  min-width: var(--size-120);
}

.foreman-select,
.labour-input,
.profit-centre-labour-input,
.staff-input {
  width: 100%;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: none;
  border-radius: 0;
  font-size: var(--font-size-xs);
  background: var(--white);
  color: var(--text-color);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  line-height: 1;
  /* Webkit appearance consolidated from duplicate definition */
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Hide number spinners for labour input fields */
.labour-input,
/* Webkit appearance rules moved to main .staff-input definition */

/* Hide number spinners for webkit browsers */
.labour-input::-webkit-outer-spin-button,
.labour-input::-webkit-inner-spin-button,
.profit-centre-labour-input::-webkit-outer-spin-button,
.profit-centre-labour-input::-webkit-inner-spin-button,
.staff-input::-webkit-outer-spin-button,
.staff-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.foreman-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 var(--border-width-thick) var(--primary-alpha-2);
}

.labour-input:focus,
.profit-centre-labour-input:focus,
.staff-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.foreman-select:hover,
.labour-input:hover,
.profit-centre-labour-input:hover,
.staff-input:hover {
  border-color: var(--gray-300);
}

/* Loading and State Indicators */
.foreman-select.saving,
.labour-input.saving,
.profit-centre-labour-input.saving,
.staff-input.saving {
  border-color: var(--warning);
  background: var(--warning-light);
  cursor: wait;
}

.foreman-select.saved,
.labour-input.saved,
.profit-centre-labour-input.saved,
.staff-input.saved {
  border-color: var(--success);
  background: var(--success-light);
}

.foreman-select.error,
.labour-input.error,
.profit-centre-labour-input.error,
.staff-input.error {
  border-color: var(--danger);
  background: var(--danger-light);
}

/* Floating Checkbox Styles */
.floating-checkbox {
  position: relative;
  margin-bottom: var(--spacing-lg);
  width: 100%;
  min-width: var(--size-200);
  padding: var(--spacing-md);
  border: var(--border-width-thick) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.floating-checkbox:hover {
  border-color: var(--primary);
}

.floating-checkbox:focus-within {
  border-color: var(--primary);
  outline: none;
}

.floating-checkbox .checkbox-container {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.floating-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
}

.floating-checkbox input[type="checkbox"]:focus {
  outline: none;
  border-color: var(--primary);
}

.floating-checkbox input[type="checkbox"]:hover {
  border-color: var(--primary);
}

.floating-checkbox input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.floating-checkbox .checkbox-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  color: var(--white);
  opacity: 0;
  transition: var(--transition-fast);
  pointer-events: none;
}

.floating-checkbox input[type="checkbox"]:checked + .checkbox-icon {
  opacity: 1;
}

.floating-checkbox .checkbox-label {
  color: var(--gray-600) !important;
  font-size: var(--font-size-base);
  font-weight: normal;
  cursor: pointer;
  margin: 0;
  transition: var(--transition-fast);
  user-select: none;
  flex: 1;
}

.floating-checkbox input[type="checkbox"]:checked ~ .checkbox-label {
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

.floating-checkbox input[type="checkbox"]:disabled {
  background: var(--gray-50);
  border-color: var(--border-color-light);
  cursor: not-allowed;
}

.floating-checkbox:has(input[type="checkbox"]:disabled) {
  background: var(--gray-50);
  cursor: not-allowed;
}

.floating-checkbox input[type="checkbox"]:disabled ~ .checkbox-label {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Validation states for floating checkbox */
.floating-checkbox.error {
  border-color: var(--danger);
  background: var(--danger-light);
}

.floating-checkbox.error input[type="checkbox"] {
  border-color: var(--danger);
}

.floating-checkbox.error .checkbox-label {
  color: var(--danger);
}

.floating-checkbox.success {
  border-color: var(--success);
  background: var(--success-light);
}

.floating-checkbox.success input[type="checkbox"] {
  border-color: var(--success);
}

.floating-checkbox.success .checkbox-label {
  color: var(--success);
}

/* Filter bar specific styles */
.filter-bar .floating-checkbox {
  width: auto;
  min-width: auto;
}

/* Responsive table adjustments */
@media (max-width: 1200px) {
  .enhanced-table {
    font-size: var(--font-size-xs);
  }
  
  .enhanced-table th,
  .enhanced-table td {
    padding: var(--spacing-xs) var(--spacing-2xs);
  }
  
  .foreman-select,
  .labour-input,
  .profit-centre-labour-input,
  .staff-input {
    font-size: var(--font-size-2xs);
    padding: var(--spacing-2xs) var(--spacing-xs);
  }
}

@media (max-width: 1200px) {
  .enhanced-table .project-description {
    max-width: var(--size-150);
  }
  
  .foreman-cell {
    min-width: var(--size-100);
  }
  
  .labour-cell {
    min-width: var(--size-50);
  }
}

/* Horizontal scroll for very wide tables - consolidated with main .projects-panel definition */

