/* Version badge */
.version-badge {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  color: #999;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  z-index: 999;
  font-family: monospace;
}

/* Page-specific overrides - using CSS variables from styles.css */

/* Mode visibility controls */
#upload-mode, #batch-upload-mode, #history-mode, #favorites-mode, #map-mode, #admin-mode {
  display: none;
}

/* Hide main content until authentication is confirmed */
.container, .tab-bar, .top-controls {
  display: none;
}

/* Show login modal by default for unauthenticated users */
#login-modal {
  display: flex !important;
}

/* Hide login modal when user is authenticated */
.authenticated #login-modal {
  display: none !important;
}

/* Show main content when user is authenticated */
.authenticated .container {
  display: block !important;
}

.authenticated .tab-bar {
  display: flex !important;
}

.authenticated .top-controls {
  display: flex !important;
}

/* Hide top controls in lightbox mode */
.lightbox-open .top-controls {
  display: none !important;
}

/* Confidence border indicators */
.low-confidence {
  border-left: 4px solid var(--accent-orange) !important;
}
.uncertain-confidence {
  border-left: 4px solid var(--accent-orange) !important;
}
.confident-result {
  border-left: 4px solid var(--accent-green) !important;
}
.missing-info {
  border-left: 4px solid var(--accent-red) !important;
}

/* Filter container layout improvements */
.filter-container {
  margin-bottom: var(--space-5);
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.filter-container label {
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.filter-container input[type="text"] {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.filter-container input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

body.dark-mode .filter-container input[type="text"] {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
}

/* Airport list styling */
.airport-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.airport-list li {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-color-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.airport-list li:hover {
  background-color: var(--primary-50);
  border-color: var(--primary-300);
}

.airport-list li:active {
  background-color: var(--primary-100);
}

body.dark-mode .airport-list li:hover {
  background-color: rgba(33, 150, 243, 0.15);
}

body.dark-mode .airport-list li:active {
  background-color: rgba(33, 150, 243, 0.25);
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  transition: opacity var(--transition-slow);
}
.lightbox-content {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.lightbox-image-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}
.lightbox.active .lightbox-image-container {
  touch-action: none;
}
.lightbox-info-panel {
  width: 380px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.95));
  color: white;
  padding: var(--space-6);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}
.lightbox.active .lightbox-info-panel {
  touch-action: pan-y;
}
.lightbox-controls {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: flex;
  gap: var(--space-3);
  z-index: 1100;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.1s ease-out;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
}
.lightbox.active img {
  touch-action: none;
}

.lightbox img:active {
  cursor: grabbing;
}
.lightbox-info-content {
  color: #fff;
  line-height: 1.6;
}
/* Force remove any old positioning */
#lightbox-caption {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  margin: 0 !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}
.lightbox-info-section {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lightbox-info-section:last-child {
  border-bottom: none;
}
.lightbox-info-section h4 {
  margin: 0 0 var(--space-3) 0;
  color: var(--primary-300);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.highlight-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: var(--space-2);
  vertical-align: middle;
  box-shadow: 0 0 4px currentColor;
}
.highlight-low-confidence {
  background-color: var(--accent-orange);
}
.highlight-missing-info {
  background-color: var(--accent-red);
}

/* Confidence Level Styles for Toast Notifications */
.confidence-high {
  color: var(--accent-green);
  font-weight: 600;
}
.confidence-medium {
  color: var(--accent-orange);
  font-weight: 600;
}
.confidence-low {
  color: var(--accent-red);
  font-weight: 600;
}
.confidence-uncertain {
  color: var(--accent-orange);
  font-weight: 600;
}
.confidence-confident {
  color: var(--accent-green);
  font-weight: 600;
}
.confidence-no-registration {
  color: var(--gray-500);
  font-weight: 600;
}

/* Backend Indicator Styles */
.backend-indicator {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  font-style: italic;
  margin-left: var(--space-2);
}

/* Uploader tag styles - base handled in styles.css */
.uploader:not([style]) {
  background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
}

.caption-info {
  margin-bottom: 20px;
  text-align: left;
}

.caption-metadata {
  margin-bottom: 20px;
  text-align: left;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  transform: translateY(-50%);
  z-index: 1050;
}
.lightbox-nav-btn {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  transition: background-color 0.2s, transform 0.2s;
}
.lightbox-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}
.lightbox.active {
  display: flex;
}
.lightbox-edit-form {
  display: flex;
  gap: 5px;
  margin-top: 5px;
  align-items: center;
  justify-content: center;
}
.lightbox-edit-form input {
  padding: 5px;
  border-radius: 3px;
  border: 1px solid #ccc;
}
.lightbox-edit-form button {
  padding: 5px 10px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.lightbox-edit-form button:hover {
  background-color: #0d8aee;
}

/* Loading Indicator - handled in styles.css */

/* Progress Bar Styles - handled in styles.css */

/* Disabled state for navigation during upload */
.disabled-during-upload {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}
.tab-bar button.disabled-during-upload {
  background-color: #f5f5f5;
  color: #999;
}
.dark-mode .tab-bar button.disabled-during-upload {
  background-color: #333;
  color: #666;
}

/* Upload locked indicator */
.upload-locked-indicator {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(255, 152, 0, 0.9);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: bold;
  z-index: 1500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: none;
}
.upload-locked-indicator.active {
  display: block;
  animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  50% { 
    box-shadow: 0 2px 20px rgba(255, 152, 0, 0.6);
  }
}

/* Single Upload Mode Styles */
#upload-mode form > * {
  margin-top: 20px;
  margin-bottom: 20px;
}
#preview-container {
  text-align: center;
}
#preview-container img {
  max-width: 200px;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Batch Upload Styles */
#batch-upload-mode form > * {
  margin-top: 20px;
  margin-bottom: 20px;
}
#batch-results {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}
.result-tile {
  background: var(--bg-primary);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: 220px;
  border: 1px solid var(--border-color-light);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}
.result-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.result-tile img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.tile-caption {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: var(--text-secondary);
}
.tile-caption strong {
  color: var(--text-primary);
  font-size: var(--font-size-base);
}

/* Processing tile - shown while upload is in progress */
.result-tile.processing {
  position: relative;
  min-height: 200px;
}
.result-tile.processing .processing-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  text-align: center;
  min-height: 150px;
  background: linear-gradient(135deg, var(--primary-50), var(--bg-primary));
  border-radius: var(--radius-md);
}
.result-tile.processing .spinning {
  font-size: 2.5rem;
  margin-bottom: var(--space-2);
}
.result-tile.processing .processing-text {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}
.result-tile.processing .spinning {
  opacity: 0.5;
  animation: gentlePulse 2s ease-in-out infinite;
}
@keyframes gentlePulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}
.result-tile.processing .processing-filename {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  word-break: break-all;
  margin-top: var(--space-1);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark-mode .result-tile.processing .processing-overlay {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), var(--bg-secondary));
}

/* Active processing tile - currently being uploaded */
.result-tile.processing.active-processing {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px var(--primary-200), var(--shadow-md);
}
.result-tile.processing.active-processing .processing-text {
  color: var(--primary-600);
  font-weight: 600;
}
.result-tile.processing.active-processing .spinning {
  opacity: 1;
  animation: gentleBounce 1s ease-in-out infinite;
}
body.dark-mode .result-tile.processing.active-processing {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3), var(--shadow-md);
}
body.dark-mode .result-tile.processing.active-processing .processing-text {
  color: var(--primary-300);
}

/* Tile wall clock - elapsed time display */
.tile-clock {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
  font-variant-numeric: tabular-nums;
  font-family: monospace;
}
.result-tile.processing.active-processing .tile-clock {
  color: var(--primary-600);
}
body.dark-mode .result-tile.processing.active-processing .tile-clock {
  color: var(--primary-300);
}
.tile-elapsed {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  font-family: monospace;
}

/* Success animation for completed tiles */
@keyframes fadeInUp {
  from {
    opacity: 0.7;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success checkmark flash */
.result-tile.just-completed::before {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--accent-green);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successFlash 0.8s ease-out forwards;
  z-index: 10;
}
@keyframes successFlash {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
body.dark-mode .result-tile.just-completed::before {
  background: rgba(30, 30, 30, 0.9);
}

/* Upload progress inline section */
.upload-progress-inline {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-5) auto;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color-light);
  text-align: center;
}
.upload-progress-inline h3 {
  margin: 0 0 var(--space-3) 0;
  color: var(--text-primary);
  font-size: var(--font-size-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.upload-progress-inline .warning-message {
  background: #fff8e1;
  color: #6d4c00;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-orange);
  margin: var(--space-4) 0;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  text-align: left;
}
body.dark-mode .upload-progress-inline {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}
body.dark-mode .upload-progress-inline .warning-message {
  background: rgba(255, 152, 0, 0.15);
  color: var(--accent-orange);
}
.upload-progress-inline .progress-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin: var(--space-3) 0;
  font-size: var(--font-size-base);
}
.upload-progress-inline .progress-stat {
  font-weight: 600;
}
.upload-progress-inline .progress-stat.current {
  color: var(--primary-600);
}
.upload-progress-inline .progress-stat.total {
  color: var(--text-tertiary);
}
body.dark-mode .upload-progress-inline .progress-stat.current {
  color: var(--primary-300);
}

/* Cancel upload button */
.cancel-upload-btn {
  display: block;
  margin: var(--space-4) auto 0;
  padding: var(--space-2) var(--space-5);
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.cancel-upload-btn:hover {
  background: linear-gradient(135deg, var(--accent-red-dark), #b71c1c);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.cancel-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Cancelled tile styling */
.result-tile.cancelled-tile {
  background-color: var(--gray-100);
  border-color: var(--gray-300);
}
.cancelled-icon {
  font-size: 2rem;
  text-align: center;
  padding: var(--space-4) 0;
  opacity: 0.6;
}
.cancelled-tile .tile-caption {
  color: var(--text-tertiary);
}
body.dark-mode .result-tile.cancelled-tile {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
}
#reset-button {
  display: block;
  margin: var(--space-5) auto;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
#reset-button:hover {
  background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
body.dark-mode #reset-button {
  background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
}
body.dark-mode #reset-button:hover {
  background: linear-gradient(135deg, var(--gray-700), var(--gray-800));
}
#batch-loading-indicator {
  text-align: center;
  font-size: 2em;
  margin-top: 10px;
}

/* Map Styles */
.map-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
#aircraft-map {
  flex: 3;
  min-width: 300px;
  height: 600px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}
#map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 245, 245, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 8px;
}
#map-loading .spinning {
  font-size: 3em;
  margin-bottom: 15px;
  animation: spin 1s linear infinite;
}
#map-loading .loading-text {
  font-size: 1.1em;
  color: #666;
}
body.dark-mode #map-loading {
  background: rgba(30, 30, 30, 0.95);
}
body.dark-mode #map-loading .loading-text {
  color: #aaa;
}
.map-sidebar {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.map-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-path {
  stroke: #2196F3;
  stroke-width: 2;
  opacity: 0.7;
}
.map-path:hover {
  stroke-width: 4;
  opacity: 1;
}
.airport-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style-type: none;
}
.airport-list li {
  padding: 5px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.airport-list li:hover {
  background-color: #f0f0f0;
}

/* Admin Mode Styles */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5);
}
.admin-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color-light);
}
.admin-section h3 {
  margin-top: 0;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-500);
  padding-bottom: var(--space-3);
  font-weight: 600;
}

/* Claude Debug Lightbox (admin only) */
.claude-debug-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}
.claude-debug-lightbox.active {
  display: flex;
}
.claude-debug-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color-light);
  overflow: hidden;
}
.claude-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color-light);
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.08), transparent);
  flex-shrink: 0;
}
.claude-debug-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
}
.claude-debug-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}
.claude-debug-close:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.1);
}
.claude-debug-body {
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1;
  line-height: 1.6;
  color: var(--text-secondary);
}
.claude-debug-section {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color-light);
}
.claude-debug-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.claude-debug-section h4 {
  margin: 0 0 var(--space-3) 0;
  font-size: var(--font-size-base);
  color: var(--primary-500);
  font-weight: 600;
}
.claude-debug-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.claude-debug-badge.confident {
  background: rgba(76, 175, 80, 0.15);
  color: var(--accent-green);
}
.claude-debug-badge.uncertain {
  background: rgba(255, 152, 0, 0.15);
  color: var(--accent-orange);
}
.claude-debug-badge.no-registration {
  background: rgba(244, 67, 54, 0.15);
  color: var(--accent-red);
}
.claude-debug-detection {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border-color-light);
}
.claude-debug-detection:last-child {
  margin-bottom: 0;
}
.claude-debug-field {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.claude-debug-field:last-child {
  margin-bottom: 0;
}
.claude-debug-label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
  flex-shrink: 0;
}
.claude-debug-value {
  color: var(--text-secondary);
  word-break: break-word;
}
.claude-debug-notes {
  font-style: italic;
  color: var(--text-tertiary);
  white-space: pre-wrap;
}
.claude-debug-confidence-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  margin-top: var(--space-2);
  overflow: hidden;
}
.claude-debug-confidence-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
body.dark-mode .claude-debug-content {
  background: var(--bg-primary);
  border-color: var(--border-color);
}
body.dark-mode .claude-debug-header {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.12), transparent);
  border-color: var(--border-color);
}
body.dark-mode .claude-debug-section {
  border-color: var(--border-color);
}
body.dark-mode .claude-debug-detection {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}
body.dark-mode .claude-debug-close:hover {
  background: rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
  .claude-debug-content {
    width: 95%;
    max-height: 90vh;
  }
  .claude-debug-field {
    flex-direction: column;
    gap: 2px;
  }
  .claude-debug-label {
    min-width: unset;
  }
}

/* Dark Mode Overrides - uses CSS variables from styles.css */
body.dark-mode .history-item,
body.dark-mode .result-tile {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-color);
}
body.dark-mode #preview-container img {
  border: 1px solid var(--border-color);
}
body.dark-mode .lightbox {
  background-color: rgba(0, 0, 0, 0.95);
}

/* Return-to-top arrow styling - handled in styles.css */

/* Admin User Controls */
.user-controls {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.user-controls button {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.user-controls button:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#user-info {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Admin Create User Form */
#create-user-form {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

#create-user-form h4 {
  margin: 0 0 var(--space-3) 0;
  color: var(--text-primary);
}

#create-user-form label {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

#create-user-form input,
#create-user-form select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

#create-user-form input:focus,
#create-user-form select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

#create-user-form select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  padding-right: 28px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.admin-form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

/* Admin Buttons */
.admin-btn {
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  color: white;
}

.admin-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-btn-success {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
}

.admin-btn-success:hover {
  background: linear-gradient(135deg, var(--accent-green-dark), #2e7d32);
}

.admin-btn-danger {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
}

.admin-btn-danger:hover {
  background: linear-gradient(135deg, var(--accent-red-dark), #b71c1c);
}

/* Admin Users Table */
#users-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
}

#users-table thead tr {
  background: var(--bg-secondary);
}

#users-table th {
  padding: var(--space-3);
  text-align: left;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

#users-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-color-light);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

#users-table tbody tr:hover {
  background: var(--bg-secondary);
}

.admin-table-message {
  padding: var(--space-5) !important;
  text-align: center;
  color: var(--text-secondary);
}

.admin-nowrap {
  white-space: nowrap;
}

.admin-align-right {
  text-align: right;
}

/* Admin Table Inline Elements */
.admin-type-select {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  cursor: pointer;
  background: var(--bg-primary);
  color: var(--text-primary);
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  padding-right: 24px;
}

.admin-type-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  background: var(--accent-orange);
  color: #333;
}

.admin-action-btn {
  padding: var(--space-1) var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-size-xs);
  transition: all var(--transition-fast);
  color: white;
  margin-right: var(--space-1);
}

.admin-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.admin-action-btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.admin-action-btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

.admin-action-btn-warning {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
}

.admin-action-btn-warning:hover {
  background: linear-gradient(135deg, var(--accent-orange-dark), #e65100);
}

.admin-action-btn-danger {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
}

.admin-action-btn-danger:hover {
  background: linear-gradient(135deg, var(--accent-red-dark), #b71c1c);
}

.admin-inactive-label,
.admin-current-user-label {
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
}

.admin-cost-label {
  color: var(--text-tertiary);
  font-size: var(--font-size-xs);
}

.admin-status-text {
  margin-left: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.users-container {
  margin-top: var(--space-4);
}

/* Admin dark mode overrides */
body.dark-mode .admin-container h2 {
  color: var(--text-primary);
}

body.dark-mode .admin-section {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

body.dark-mode #create-user-form select {
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23999" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
}

body.dark-mode .admin-type-select {
  background-color: var(--bg-tertiary);
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23999" d="M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z"/></svg>');
}

body.dark-mode .admin-type-badge {
  background: #ffc107;
  color: #000;
}

/* User Settings Modal Styling */
.settings-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.settings-modal-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

.settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color-light);
}

.settings-modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
}

.settings-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.settings-close-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.settings-form {
  padding: var(--space-4);
}

.settings-form h4 {
  margin: 0 0 var(--space-4) 0;
  color: var(--text-primary);
  font-size: var(--font-size-base);
}

.settings-form .form-group {
  margin-bottom: var(--space-4);
}

.settings-form label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.settings-form input {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.settings-form input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.settings-error {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

.settings-submit-btn {
  width: 100%;
  padding: var(--space-3);
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: background 0.2s ease;
}

.settings-submit-btn:hover {
  background: var(--primary-600);
}

.settings-submit-btn:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

/* Settings tabs styling */
.settings-tab.active {
  color: var(--primary-500) !important;
  border-bottom-color: var(--primary-500) !important;
}
.settings-tab:hover:not(.active) {
  background: var(--bg-secondary);
}
.sharing-option:hover {
  border-color: var(--primary-400) !important;
  background: var(--bg-secondary);
}
.sharing-option:has(input:checked) {
  border-color: var(--primary-500) !important;
  background: var(--primary-50);
}
body.dark-mode .sharing-option:has(input:checked) {
  background: rgba(33, 150, 243, 0.1);
}
/* Custom radio button styling for sharing options */
.sharing-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-primary);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
.sharing-option input[type="radio"]:checked {
  border-color: var(--primary-500);
  background: var(--primary-500);
}
.sharing-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}
.sharing-option input[type="radio"]:hover {
  border-color: var(--primary-400);
}
.sharing-option-content {
  flex: 1;
  min-width: 0;
}
.sharing-option-title {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.sharing-option-description {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

body.dark-mode .settings-modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

body.dark-mode .settings-modal-header {
  border-bottom-color: var(--border-color);
}

body.dark-mode .settings-form input {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

body.dark-mode .settings-close-btn:hover {
  background: var(--bg-tertiary);
}

body.dark-mode .settings-error {
  background: rgba(244, 67, 54, 0.2);
  color: #ff8a80;
}

/* Additional lightbox info panel styling */
.caption-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 15px;
}
.caption-buttons button {
  background-color: #2196F3;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}
.caption-buttons button:hover {
  background-color: #0d8aee;
}
.caption-buttons .delete-button {
  background-color: #F44336;
}
.caption-buttons .delete-button:hover {
  background-color: #d32f2f;
}

/* Mobile responsive lightbox */
@media (max-width: 768px) {
  .lightbox-content {
    flex-direction: column;
  }
  
  .lightbox-info-panel {
    width: 100%;
    max-height: 40%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .lightbox-image-container {
    flex: 1;
    min-height: 60%;
  }
  
  .lightbox-controls {
    right: 10px;
  }
}

/* Mobile landscape lightbox - keep side-by-side layout with compact info panel */
@media (max-height: 500px) and (orientation: landscape) {
  .lightbox-content {
    flex-direction: row;
  }

  .lightbox-image-container {
    flex: 1;
    min-height: 100%;
  }

  .lightbox-info-panel {
    width: 260px;
    max-height: 100%;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    padding: var(--space-3);
    font-size: 0.85em;
  }

  .lightbox-controls {
    top: 5px;
    right: 5px;
    gap: var(--space-2);
  }

  .lightbox-control-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .lightbox-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .lightbox-info-section {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
  }

  .lightbox-info-section h4 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
  }

  .caption-buttons {
    flex-direction: column;
    gap: 5px;
  }

  .caption-buttons button {
    font-size: 0.8em;
    padding: 6px 10px;
  }
}

/* Event-Based Admin Logs Styling */

/* Event Container */
.events-container {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding: 0;
}

.events-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Individual Event Item */
.event-item {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
  padding: 0;
  transition: all 0.2s ease;
  position: relative;
}

.event-item:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}

.event-item:first-child {
  border-radius: 8px 8px 0 0;
}

.event-item:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Event Header */
.event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.event-header:hover {
  background: rgba(0,0,0,0.02);
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* Event Type Indicators */
.event-type-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 60px;
  text-align: center;
}

.event-type-upload {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.event-type-ocr {
  background: #cce7ff;
  color: #004085;
  border: 1px solid #b8daff;
}

.event-type-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.event-type-api {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.event-type-auth {
  background: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

.event-type-system {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Timestamp Styling */
.event-timestamp {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

/* User Badge */
.event-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
}

.user-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Event Action Description */
.event-action {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
  margin-left: 8px;
  flex: 1;
}

/* Expand/Collapse Button */
.event-toggle {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-toggle:hover {
  background: #e9ecef;
  color: #495057;
}

.event-toggle.expanded {
  transform: rotate(180deg);
}

/* Event Details Section */
.event-details {
  display: none;
  padding: 0 16px 16px 16px;
  border-top: 1px solid #f1f3f4;
  background: #fafbfc;
}

.event-details.expanded {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Event Details Content */
.event-details-content {
  padding: 12px 0;
}

.event-detail-section {
  margin-bottom: 12px;
}

.event-detail-label {
  font-weight: 600;
  color: #495057;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.event-detail-value {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
}

/* JSON Code Formatting */
.event-json {
  background: #2d3748;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  border: 1px solid #4a5568;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.event-json .json-key {
  color: #63b3ed;
}

.event-json .json-string {
  color: #68d391;
}

.event-json .json-number {
  color: #fbb6ce;
}

.event-json .json-boolean {
  color: #f6ad55;
}

.event-json .json-null {
  color: #a0aec0;
}

/* Search and Filter Controls */
.event-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.event-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
}

.event-search:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.event-filter-select {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.event-filter-select:focus {
  outline: none;
  border-color: #2196F3;
}

/* Refresh and Action Buttons */
.event-action-buttons {
  display: flex;
  gap: 8px;
}

.event-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-btn-primary {
  background: #2196F3;
  color: white;
}

.event-btn-primary:hover {
  background: #1976D2;
  transform: translateY(-1px);
}

.event-btn-secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.event-btn-secondary:hover {
  background: #e9ecef;
}

/* Loading States */
.event-loading {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.event-loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2196F3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty State */
.events-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.events-empty-icon {
  font-size: 48px;
  color: #dee2e6;
  margin-bottom: 12px;
}

/* Statistics Cards */
.event-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.event-stat-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  text-align: center;
}

.event-stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #495057;
  margin-bottom: 4px;
}

.event-stat-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dark Mode Styles for Events */
body.dark-mode .events-container {
  background: #2d2d2d;
  border-color: #404040;
}

body.dark-mode .event-item {
  background: #1e1e1e;
  border-bottom-color: #404040;
}

body.dark-mode .event-item:hover {
  background: #2a2a2a;
}

body.dark-mode .event-header:hover {
  background: rgba(255,255,255,0.05);
}

body.dark-mode .event-details {
  background: #2a2a2a;
  border-top-color: #404040;
}

body.dark-mode .event-timestamp {
  color: #b0b0b0;
}

body.dark-mode .event-action {
  color: #e0e0e0;
}

body.dark-mode .event-user-badge {
  background: #2a2a2a;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .event-toggle {
  color: #b0b0b0;
}

body.dark-mode .event-toggle:hover {
  background: #404040;
  color: #e0e0e0;
}

body.dark-mode .event-detail-label {
  color: #e0e0e0;
}

body.dark-mode .event-detail-value {
  color: #b0b0b0;
}

body.dark-mode .event-search {
  background: #2a2a2a;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .event-search:focus {
  border-color: #2196F3;
}

body.dark-mode .event-filter-select {
  background: #2a2a2a;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .event-btn-secondary {
  background: #2a2a2a;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .event-btn-secondary:hover {
  background: #404040;
}

body.dark-mode .event-stat-card {
  background: #1e1e1e;
  border-color: #404040;
}

body.dark-mode .event-stat-number {
  color: #e0e0e0;
}

body.dark-mode .event-stat-label {
  color: #b0b0b0;
}

body.dark-mode .event-loading,
body.dark-mode .events-empty {
  color: #b0b0b0;
}

body.dark-mode .events-empty-icon {
  color: #404040;
}

/* Responsive Design for Events */
@media (max-width: 768px) {
  .event-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .event-search {
    min-width: auto;
  }
  
  .event-action-buttons {
    justify-content: center;
  }
  
  .event-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .event-header {
    padding: 12px;
  }
  
  .event-details {
    padding: 0 12px 12px 12px;
  }
  
  .event-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .event-json {
    font-size: 11px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .event-stats {
    grid-template-columns: 1fr;
  }
  
  .event-type-badge {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .event-timestamp {
    font-size: 11px;
  }
  
  .event-action {
    font-size: 13px;
  }
}

/* Accessibility Improvements */
.event-toggle:focus {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}

.event-search:focus,
.event-filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.event-btn:focus {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}

/* Smooth Scrolling for Event Container */
.events-container {
  scroll-behavior: smooth;
}

/* Event Priority Indicators */
.event-item.priority-high {
  border-left: 4px solid #dc3545;
}

.event-item.priority-medium {
  border-left: 4px solid #ffc107;
}

.event-item.priority-low {
  border-left: 4px solid #28a745;
}

/* Event Status Indicators */
.event-status {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.event-status.success {
  background: #28a745;
}

.event-status.warning {
  background: #ffc107;
}

.event-status.error {
  background: #dc3545;
}

.event-status.info {
  background: #17a2b8;
}
