/* Main Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

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

h1 {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Tab Navigation */
.tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  background-color: transparent;
  border: none;
  font-size: 16px;
  font-weight: 500;
}

.tab.active {
  border-bottom: 2px solid #333;
}

/* Image Grid */
.image-grid, .seed-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Seed Group */
.seed-group {
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 15px;
}

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

.seed-group .seed-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 15px;
}

.seed-group .view-button {
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.seed-group .view-button:hover {
  background-color: #1976D2;
}

.seed-pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.image-card {
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
  position: relative;
  opacity: 1;
}

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

.image-card.selected {
  box-shadow: 0 0 0 3px #2196F3, 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Recently engaged image highlight */
.image-card.recently-engaged {
  box-shadow: 0 0 0 2px #28a745, 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.image-card.recently-engaged::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 1px solid rgba(40, 167, 69, 0.4);
  border-radius: 6px;
  pointer-events: none;
  animation: recentEngagementPulse 2s ease-out;
}

/* When an image is both selected and recently engaged */
.image-card.selected.recently-engaged {
  box-shadow: 0 0 0 3px #2196F3, 0 0 0 5px rgba(40, 167, 69, 0.6), 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Subtle pulse animation for recent engagement */
@keyframes recentEngagementPulse {
  0% {
    border-color: rgba(40, 167, 69, 0.8);
    transform: scale(1.02);
  }
  50% {
    border-color: rgba(40, 167, 69, 0.6);
  }
  100% {
    border-color: rgba(40, 167, 69, 0.4);
    transform: scale(1);
  }
}

.image-card .checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.image-card:hover .checkbox {
  opacity: 1;
}

.image-card .checkbox.checked {
  background-color: #2196F3;
  color: white;
  opacity: 1;
}

.image-card .checkbox i {
  font-size: 16px;
}

.image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.image-card .caption {
  padding: 10px;
  font-size: 14px;
  color: #555;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.pagination button {
  background-color: white;
  border: 1px solid #ddd;
  padding: 8px 16px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 4px;
}

.pagination button:hover {
  background-color: #f5f5f5;
}

.pagination button:disabled {
  background-color: #f5f5f5;
  color: #aaa;
  cursor: not-allowed;
}

.pagination .current-page {
  padding: 8px 16px;
  margin: 0 5px;
}

/* Logs Section */
.logs-container {
  background-color: white;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.logs-title {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 500;
}

.log-entry {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  font-family: monospace;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-time {
  width: 180px;
  color: #777;
}

.log-level {
  width: 60px;
  font-weight: bold;
  margin-right: 10px;
}

.log-level.info {
  color: #2196F3;
}

.log-level.error {
  color: #F44336;
}

.log-message {
  flex: 1;
}

/* Action Button */
.action-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  z-index: 100;
  transition: transform 0.3s ease, background-color 0.2s, opacity 0.3s ease;
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
}

.action-button.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.action-button:hover {
  background-color: #1976D2;
}

.action-button:active {
  transform: translateY(2px);
}

.action-button i {
  margin-right: 8px;
}

.action-button .count {
  background-color: white;
  color: #2196F3;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-size: 14px;
  font-weight: bold;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.success {
  background-color: #4CAF50;
}

.toast.error {
  background-color: #F44336;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px;
  color: #777;
}

.loading:after {
  content: "...";
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%, 100% {
    content: "...";
  }
}

/* Infinite Scroll Loading Indicator */
.infinite-scroll-loader {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  color: #777;
  display: none;
}

.infinite-scroll-loader.visible {
  display: block;
}

.infinite-scroll-loader:after {
  content: "Loading more images...";
  animation: dots 1.5s steps(5, end) infinite;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

/* Voting UI */
.vote-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 10px;
  margin-top: 10px;
  display: inline-block;
}

.vote-button:hover {
  background-color: #45a049;
}

.vote-panel {
  display: none;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 10px;
  margin-top: 10px;
  z-index: 10;
}

.vote-panel.active {
  display: block;
}

.voter-selection {
  margin-bottom: 10px;
}

.voter-option {
  display: inline-block;
  margin-right: 10px;
  cursor: pointer;
}

.voter-option input {
  margin-right: 5px;
}

.rating-selection {
  display: none;
  margin-top: 10px;
}

.rating-selection.active {
  display: block;
}

.rating-option {
  display: inline-block;
  margin-right: 10px;
  cursor: pointer;
}

.rating-option input {
  margin-right: 5px;
}

.vote-actions {
  margin-top: 10px;
  text-align: right;
}

.save-vote-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}

.cancel-vote-button {
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  margin-right: 5px;
  cursor: pointer;
}

/* Votes Grid */
.votes-container {
  padding: 20px 0;
}

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

.votes-title {
  font-size: 18px;
  font-weight: 500;
}

.refresh-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.refresh-button:hover {
  background-color: #45a049;
}

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

.vote-card {
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.vote-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.vote-info {
  padding: 15px;
}

.vote-prompt {
  font-size: 14px;
  margin-bottom: 10px;
  color: #555;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.vote-results {
  margin-top: 10px;
}

.voter-result {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.voter-name {
  width: 30px;
  font-weight: 500;
  margin-right: 10px;
}

.rating-bar {
  flex-grow: 1;
  height: 15px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.rating-value {
  height: 100%;
  background-color: #4CAF50;
  border-radius: 10px;
}

.rating-text {
  position: absolute;
  right: 5px;
  top: 0;
  font-size: 12px;
  color: #333;
  line-height: 15px;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 4px;
}

.lightbox-prompt {
  color: white;
  font-size: 16px;
  text-align: center;
  max-width: 800px;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  margin-top: 10px;
}

.close-lightbox {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close-lightbox:hover {
  color: #ccc;
}

/* Lightbox floating action buttons */
.lightbox-actions {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2001;
}

.lightbox-action-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.lightbox-action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.lightbox-action-btn.save-btn {
  background: rgba(33, 150, 243, 0.9);
  color: white;
}

.lightbox-action-btn.save-btn:hover {
  background: rgba(33, 150, 243, 1);
}

.lightbox-action-btn.delete-btn {
  background: rgba(244, 67, 54, 0.9);
  color: white;
}

.lightbox-action-btn.delete-btn:hover {
  background: rgba(244, 67, 54, 1);
}

.lightbox-action-btn.audit-btn {
  background: rgba(76, 175, 80, 0.9);
  color: white;
}

.lightbox-action-btn.audit-btn:hover {
  background: rgba(76, 175, 80, 1);
}

/* Hide lightbox actions when lightbox is not active */
.lightbox:not(.active) .lightbox-actions {
  display: none;
}

/* Delete button styles */
.delete-button {
  background-color: #dc3545 !important;
  right: 30px; /* Same horizontal position as save button */
  bottom: 110px; /* Stack above the save button with proper spacing */
}

.delete-button:hover {
  background-color: #c82333 !important;
}

.delete-button .count {
  background-color: white;
  color: #dc3545;
}

/* Adjust save button to ensure proper stacking */
#save-button {
  bottom: 30px;
  right: 30px;
}

/* Create Run Tab Styles */
.create-run-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.credits-display {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.credits-info {
  font-size: 16px;
  font-weight: 500;
}

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

.refresh-button:hover {
  background: #0056b3;
}

.create-run-form {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.form-section:last-child {
  border-bottom: none;
}

.form-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
}

.upload-area {
  margin-bottom: 20px;
}

.upload-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-button:hover {
  background: #218838;
}

.user-seed-images, .user-reference-images, .user-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.seed-image-card, .reference-image-card, .prompt-card {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.seed-image-card:hover, .prompt-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.reference-image-card:hover {
  border-color: #ff9800;
  box-shadow: 0 2px 8px rgba(255,152,0,0.2);
}

.seed-image-card.selected, .prompt-card.selected {
  border-color: #007bff;
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.reference-image-card.selected {
  border-color: #ff9800;
  background: #fff3e0;
  box-shadow: 0 2px 8px rgba(255,152,0,0.3);
}

.seed-image-card img, .reference-image-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.seed-image-info, .reference-image-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.seed-image-name, .reference-image-name, .prompt-name {
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.placeholder-name {
  font-size: 11px;
  color: #666;
  font-family: monospace;
  background: #f5f5f5;
  padding: 2px 4px;
  border-radius: 3px;
  word-break: break-all;
}

.prompt-text {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
}

.delete-seed-btn, .delete-reference-btn, .delete-prompt-btn, .edit-prompt-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  width: 100%;
  margin-top: 5px;
}

.edit-prompt-btn {
  background: #ffc107;
  margin-right: 5px;
}

.delete-seed-btn:hover, .delete-reference-btn:hover, .delete-prompt-btn:hover {
  background: #c82333;
}

.edit-prompt-btn:hover {
  background: #e0a800;
}

.prompt-actions {
  margin-top: 10px;
}

.prompt-creator {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.prompt-creator input, .prompt-creator textarea {
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
}

.prompt-creator textarea {
  min-height: 100px;
  resize: vertical;
}

.save-button, .create-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.save-button:hover, .create-button:hover {
  background: #0056b3;
}

.create-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.run-config {
  display: grid;
  gap: 15px;
}

.variations-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.variations-input input {
  width: 80px;
  padding: 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.generation-runs {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
}

.runs-list {
  display: grid;
  gap: 15px;
}

.run-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  background: #f8f9fa;
}

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

.run-name {
  font-weight: 500;
  font-size: 16px;
}

.run-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-pending {
  background: #ffc107;
  color: #212529;
}

.status-running {
  background: #007bff;
  color: white;
}

.status-completed {
  background: #28a745;
  color: white;
}

.status-failed {
  background: #dc3545;
  color: white;
}

.status-paused {
  background: #6c757d;
  color: white;
}

.run-info {
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
}

.run-info div {
  margin-bottom: 5px;
}

.run-actions {
  display: flex;
  gap: 10px;
}

.start-run-btn, .stop-run-btn, .delete-run-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.start-run-btn {
  background: #28a745;
  color: white;
}

.stop-run-btn {
  background: #dc3545;
  color: white;
}

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

.start-run-btn:hover {
  background: #218838;
}

.stop-run-btn:hover {
  background: #c82333;
}

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

.no-items, .error {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

.error {
  color: #dc3545;
}

/* User Run Folders */
.seed-group.user-run {
  position: relative;
  border: 2px solid #4CAF50;
}

.seed-group.user-run:hover {
  border-color: #45a049;
}

.run-name-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(76, 175, 80, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(33, 150, 243, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Seed Images Tab */
.seed-images-container {
  padding: 20px 0;
}

.seed-images-header {
  margin-bottom: 20px;
}

.seed-images-header h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 500;
}

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

.seed-image-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seed-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.seed-image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.seed-image-card .image-info {
  padding: 15px;
}

.seed-image-card .image-name {
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.seed-image-card .image-id {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9em;
}

.seed-id-code {
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
  color: #666;
  flex: 1;
  word-break: break-all;
}

.copy-id-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  transition: background-color 0.2s ease;
}

.copy-id-button:hover {
  background: #0056b3;
}

.seed-image-card .image-description {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
}

.delete-seed-button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
}

.delete-seed-button:hover {
  background: #c82333;
}

/* Reference Images Tab */
.reference-images-container {
  padding: 20px 0;
}

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

.reference-images-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

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

.reference-image-card {
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.reference-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.reference-image-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
}

.reference-image-card .image-info {
  padding: 10px;
}

.reference-image-card .image-name {
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 14px;
}

.reference-image-card .image-placeholder {
  font-family: monospace;
  font-size: 12px;
  color: #666;
  background-color: #f5f5f5;
  padding: 2px 4px;
  border-radius: 2px;
  margin-bottom: 8px;
}

.reference-image-card .delete-btn {
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  float: right;
}

.reference-image-card .delete-btn:hover {
  background-color: #d32f2f;
}

/* Clear Form Button */
.clear-button {
  background-color: #ff9800;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.clear-button:hover {
  background-color: #f57c00;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.clear-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Audit Button Styles */
#add-audit-button {
  bottom: 200px;
  background-color: #28a745 !important;
}

#add-audit-button:hover {
  background-color: #218838 !important;
}

#remove-audit-button {
  bottom: 140px;
  background-color: #ffc107 !important;
  color: #212529 !important;
}

#remove-audit-button:hover {
  background-color: #e0a800 !important;
}

/* Adjust existing button positions */
#save-button {
  bottom: 80px;
}

#delete-button {
  bottom: 20px;
}

/* Audit Badges on Images */
.audit-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 3;
}

.audit-badge {
  background-color: rgba(40, 167, 69, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.close-modal {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
}

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

.modal-body {
  padding: 20px;
}

.auditor-list {
  display: grid;
  gap: 10px;
}

.auditor-option {
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auditor-option:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.auditor-option.selected {
  border-color: #28a745;
  background-color: #d4edda;
}

.auditor-name {
  font-weight: 500;
}

.auditor-initials {
  background-color: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}
