/* ===== Labels History Page Styles ===== */

/* ===== Page Header ===== */
.labels-history .page-header {
  margin-bottom: 2rem;
  padding: 2rem 0 1rem 0;
}

.labels-history .header-content {
  max-width: 800px;
}

.labels-history .page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  background: linear-gradient(135deg, #2c3e50, #8bc34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.dark-mode .labels-history .page-title {
  background: linear-gradient(135deg, #ecf0f1, #8bc34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.labels-history .page-subtitle {
  font-size: 1.1rem;
  color: #546e7a;
  margin: 0;
  font-weight: 400;
}

html.dark-mode .labels-history .page-subtitle {
  color: #95a5a6;
}

/* ===== Main Content Container ===== */
.labels-history .history-content {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== History Controls ===== */
.labels-history .history-controls {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #f1f5f9;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

html.dark-mode .labels-history .history-controls {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.labels-history .controls-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.labels-history .control-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.labels-history .control-label {
  font-weight: 600;
  color: #374151;
  margin: 0;
  font-size: 0.95rem;
}

html.dark-mode .labels-history .control-label {
  color: #e5e7eb;
}

.labels-history .control-select {
  padding: var(--input-padding-y, 0.75rem) var(--input-padding-x, 1rem);
  min-height: var(--input-height, 44px);
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

html.dark-mode .labels-history .control-select {
  background: #1e1e1e;
  border-color: #404040;
  color: #e5e7eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0b0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.labels-history .control-select:focus {
  outline: none;
  border-color: #8bc34a;
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2376a12b' d='M6 3L1 8h10z'/%3E%3C/svg%3E");
}

html.dark-mode .labels-history .control-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238bc34a' d='M6 3L1 8h10z'/%3E%3C/svg%3E");
}

.labels-history .control-select:hover {
  border-color: #cbd5e1;
}

html.dark-mode .labels-history .control-select:hover {
  border-color: #555;
}

/* Button styles now use components/button.css */
/* Legacy support for filter-button - maps to action-btn */
.labels-history .filter-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-family: 'Sora', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.3);
}

.labels-history .filter-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.4);
}

.labels-history .filter-button.secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

.labels-history .filter-button.secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* ===== History Table Container ===== */
.labels-history .history-table-container {
  background: white;
  border-radius: 12px;
  border: 2px solid #f1f5f9;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

html.dark-mode .labels-history .history-table-container {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.labels-history .loading-message {
  text-align: center;
  padding: 3rem;
  color: #546e7a;
}

html.dark-mode .labels-history .loading-message {
  color: #95a5a6;
}

.labels-history .loading-message i {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.labels-history .loading-message p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ===== History Details ===== */
.labels-history .history-details {
  background: white;
  border-radius: 12px;
  border: 2px solid #f1f5f9;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

html.dark-mode .labels-history .history-details {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.labels-history .history-details h4 {
  color: #2c3e50;
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

html.dark-mode .labels-history .history-details h4 {
  color: #ecf0f1;
}

/* ===== History Table ===== */
.labels-history .history-table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid #f1f5f9;
}

html.dark-mode .labels-history .history-table {
  background: #2a2a2a;
  border-color: #404040;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .labels-history .controls-group {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .labels-history .control-item {
    justify-content: space-between;
  }
  
  .labels-history .control-select {
    min-width: 120px;
  }
  
  .labels-history .filter-button {
    justify-content: center;
  }
}