/**
 * 🎨 KOMPLETT ÜBERARBEITETES ARTIKELDETAILFENSTER
 * 
 * Strukturiert, kompakt und übersichtlich
 * Optimiert für bessere Benutzerfreundlichkeit
 * KOMPAKT-VERSION für kleinere Displays
 */

/* ===== DIALOG CONTAINER ===== */
.edit-dialog {
  max-width: 95vw;
  width: 95vw;
  max-height: 95vh;
  overflow-y: auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: none;
  padding: 0;
}

.edit-dialog h3 {
  background: rgba(255, 255, 255, 0.95);
  margin: 0;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  border-radius: 12px 12px 0 0;
  border-bottom: 2px solid #3498db;
  text-align: center;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-dialog-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #2c3e50;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-dialog-close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.edit-dialog-close-btn:active {
  transform: scale(0.95);
}

/* ===== FORM CONTAINER ===== */
#edit-form {
  background: rgba(255, 255, 255, 0.98);
  padding: 16px;
  border-radius: 0 0 12px 12px;
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 500px;
}

/* Layout für die Bereiche */
.article-section.section-basic {
  grid-column: 1;
  grid-row: 1;
}

.article-section.section-prices-stock {
  grid-column: 1;
  grid-row: 2;
}

.article-section.section-history {
  grid-column: 2;
  grid-row: 1 / span 2; /* Nimmt beide Zeilen ein */
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Preishistorie Container nutzt volle Höhe */
.article-section.section-history .price-history-compact {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Preishistorie Liste nutzt verfügbaren Platz */
.article-section.section-history .price-history-compact .price-history-list-compact {
  flex: 1;
  min-height: 0;
}

/* ===== STRUKTURIERTE BEREICHE ===== */
.article-section {
  margin-bottom: 12px;
  padding: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Kompakte Bereiche für Preise und Bestand */
.article-section.section-prices,
.article-section.section-stock {
  margin-bottom: 8px;
  padding: 8px;
}

.article-section.section-prices .article-section-header,
.article-section.section-stock .article-section-header {
  margin-bottom: 8px;
  padding-bottom: 4px;
  font-size: 12px;
}

/* Kombinierter Preise & Bestand Bereich */
.article-section.section-prices-stock {
  margin-bottom: 8px;
  padding: 8px;
}

.article-section.section-prices-stock .article-section-header {
  margin-bottom: 8px;
  padding-bottom: 4px;
  font-size: 12px;
}

.prices-stock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.prices-section,
.stock-section {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 8px;
  border: 1px solid rgba(52, 152, 219, 0.1);
}

.prices-section-header,
.stock-section-header {
  font-size: 10px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid #e9ecef;
}

.article-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  color: #2c3e50;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.article-section-header::before {
  margin-right: 6px;
  font-size: 14px;
}

.section-basic .article-section-header::before { content: '📝'; }
.section-prices .article-section-header::before { content: '💰'; }
.section-stock .article-section-header::before { content: '📦'; }
.section-history .article-section-header::before { content: '📈'; }

/* ===== KOMPAKTE FORMULARZEILEN ===== */
.form-grid {
  display: grid;
  gap: 12px;
}

/* ===== WÄHRUNGSZEICHEN BEI PREISFELDERN ===== */
.price-field {
  position: relative;
}

.price-field input {
  padding-right: 25px; /* Platz für das Euro-Zeichen */
}

.price-field::after {
  content: " €";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: inherit;
  pointer-events: none;
  font-weight: 600;
  z-index: 1;
  font-size: 14px;
  line-height: 1;
  margin-top: 12px; /* Verschiebt es zur Mitte des Input-Feldes */
}

/* Dark Mode Anpassung für Währungszeichen */
@media (prefers-color-scheme: dark) {
  .price-field::after {
    color: #ffffff;
  }
}

.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.form-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-bottom: 3px;
}

.form-field input {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  font-size: 15px;
  background: #ffffff;
  color: #2c3e50;
  transition: all 0.2s ease;
  min-height: 36px;
}

.form-field input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

.form-field input:hover {
  border-color: #bdc3c7;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.price-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.price-field label {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
}

.price-field input {
  padding: 8px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  color: #2c3e50;
  transition: all 0.2s ease;
  min-height: 32px;
}

.stock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1.5fr;
  gap: 6px;
}

.stock-grid-structured {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.stock-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stock-field label {
  font-size: 11px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  margin-bottom: 2px;
  text-align: center;
}

.stock-field input {
  padding: 6px 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 13px;
  background: #ffffff;
  color: #2c3e50;
  transition: all 0.2s ease;
  min-height: 28px;
  text-align: center;
}

/* ===== PREISHISTORIE - GRÖSSER UND LESBARER ===== */
.price-history-compact {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  height: 100%;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.price-history-summary-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  flex-shrink: 0; /* Summary bleibt oben fixiert */
}

.summary-stat-compact {
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.summary-stat-compact .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.summary-stat-compact .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
}

.summary-stat-compact .stat-value.vk-neu {
  color: #27ae60;
}

.price-history-list-compact {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Nutzt den ganzen verfügbaren Platz nach unten */
}

.price-history-entry-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.price-history-entry-compact:hover {
  background: #f8f9fa;
  border-color: #bdc3c7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.price-history-entry-compact.current {
  border-color: #3498db;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.price-history-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.price-history-date-compact {
  font-weight: 600;
  font-size: 14px;
}

.price-history-source-compact {
  background: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.price-history-entry-compact.current .price-history-source-compact {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.price-history-prices-compact {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.price-item-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 100px;
}

.price-label-compact {
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.price-history-entry-compact.current .price-label-compact {
  color: rgba(255, 255, 255, 0.9);
}

.price-value-compact {
  background: #e9ecef;
  color: #2c3e50;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid #dee2e6;
  min-width: 80px;
  text-align: center;
}

.price-history-entry-compact.current .price-value-compact {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.price-item-compact.vk-neu .price-value-compact {
  background: #27ae60;
  color: white;
  border-color: #229954;
}

.price-history-entry-compact.current .price-item-compact.vk-neu .price-value-compact {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.price-history-user-compact {
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #e9ecef;
}

.price-history-entry-compact.current .price-history-user-compact {
  color: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(255, 255, 255, 0.2);
}

/* ===== KOMPAKTE AKTIONS-BUTTONS ===== */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #e9ecef;
  margin-top: 8px;
}

.delete-button {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.delete-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.main-actions {
  display: flex;
  gap: 8px;
}

.main-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

#edit-cancel {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.2);
}

#edit-cancel:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#edit-save {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.2);
}

#edit-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ===== RESPONSIVE DESIGN - KOMPAKT ===== */
@media (max-width: 768px) {
  .edit-dialog {
    width: 95vw;
    max-height: 98vh;
  }
  
  .edit-dialog h3 {
    font-size: 16px;
    padding: 10px 14px;
  }
  
  #edit-form {
    padding: 12px;
    display: block; /* Zurück zu normalem Layout auf kleinen Bildschirmen */
    min-height: auto;
    gap: 8px;
  }
  
  .article-section.section-basic,
  .article-section.section-prices-stock,
  .article-section.section-history {
    grid-column: 1;
    grid-row: auto;
    height: auto;
    margin-bottom: 8px;
  }
  
  .article-section.section-history {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 400px;
  }
  
  .price-history-list-compact {
    flex: 1;
    min-height: 0;
  }
  
  .price-history-entry-compact {
    padding: 10px;
    font-size: 13px;
  }
  
  .price-value-compact {
    font-size: 14px;
    padding: 5px 8px;
  }
  
  .prices-stock-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .form-grid-5 {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .price-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .stock-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }
  
  .stock-row {
    gap: 6px;
  }
  
  .price-history-summary-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .main-actions {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .edit-dialog {
    width: 98vw;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .edit-dialog h3 {
    border-radius: 0;
    font-size: 14px;
    padding: 8px 12px;
  }
  
  #edit-form {
    border-radius: 0;
    padding: 8px;
  }
  
  .article-section {
    padding: 8px;
    margin-bottom: 6px;
  }
  
  .prices-stock-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .stock-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  
  .stock-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .price-history-summary-compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .price-history-list-compact {
    flex: 1;
    min-height: 0;
  }
  
  .price-history-entry-compact {
    padding: 10px;
    font-size: 12px;
    gap: 6px;
  }
  
  .price-value-compact {
    font-size: 13px;
    padding: 5px 8px;
  }
  
  .price-history-date-compact {
    font-size: 12px;
  }
  
  .price-history-source-compact {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .form-field input,
  .price-field input,
  .stock-field input {
    font-size: 11px;
    padding: 4px 6px;
    min-height: 24px;
  }
  
  .form-field label,
  .price-field label,
  .stock-field label {
    font-size: 10px;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  .edit-dialog {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  }
  
  .edit-dialog h3 {
    background: rgba(26, 26, 26, 0.95);
    color: #ffffff;
    border-bottom-color: #ff6b6b;
  }
  
  .edit-dialog-close-btn {
    color: #ffffff;
  }
  
  .edit-dialog-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }
  
  #edit-form {
    background: rgba(26, 26, 26, 0.98);
  }
  
  .article-section {
    background: linear-gradient(145deg, #2d2d2d 0%, #404040 100%);
    border-color: rgba(255, 107, 107, 0.2);
  }
  
  .article-section-header {
    color: #ffffff;
    border-bottom-color: #555555;
  }
  
  .form-field label,
  .price-field label,
  .stock-field label {
    color: #ffffff;
  }
  
  .form-field input,
  .price-field input,
  .stock-field input {
    background: #404040;
    color: #ffffff;
    border-color: #555555;
  }
  
  .form-field input:focus,
  .price-field input:focus,
  .stock-field input:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
  }
  
  .form-field input:hover,
  .price-field input:hover,
  .stock-field input:hover {
    border-color: #666666;
  }
  
  .prices-section,
  .stock-section {
    background: rgba(45, 45, 45, 0.5);
    border-color: rgba(255, 107, 107, 0.1);
  }
  
  .prices-section-header,
  .stock-section-header {
    color: #ffffff;
    border-bottom-color: #555555;
  }
  
  .price-history-compact {
    background: #2d2d2d;
    border-color: #555555;
  }
  
  .price-history-summary-compact {
    background: #404040;
    border-color: #555555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .summary-stat-compact {
    background: #2d2d2d;
    border-color: #555555;
  }
  
  .summary-stat-compact .stat-label {
    color: #cccccc;
  }
  
  .summary-stat-compact .stat-value {
    color: #ffffff;
  }
  
  .summary-stat-compact .stat-value.vk-neu {
    color: #4caf50;
  }
  
  .price-history-entry-compact {
    background: #404040;
    border-color: #555555;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  
  .price-history-entry-compact:hover {
    background: #4a4a4a;
    border-color: #666666;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }
  
  .price-history-entry-compact.current {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
  }
  
  .price-history-date-compact {
    color: #ffffff;
  }
  
  .price-history-source-compact {
    background: #555555;
    color: #ffffff;
  }
  
  .price-history-entry-compact.current .price-history-source-compact {
    background: rgba(255, 255, 255, 0.25);
    color: white;
  }
  
  .price-label-compact {
    color: #cccccc;
  }
  
  .price-history-entry-compact.current .price-label-compact {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .price-value-compact {
    background: #555555;
    color: #ffffff;
    border-color: #666666;
  }
  
  .price-history-entry-compact.current .price-value-compact {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
  }
  
  .price-item-compact.vk-neu .price-value-compact {
    background: #4caf50;
    color: #ffffff;
    border-color: #45a049;
  }
  
  .price-history-entry-compact.current .price-item-compact.vk-neu .price-value-compact {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
  }
  
  .price-history-user-compact {
    color: #cccccc;
  }
  
  .price-history-entry-compact.current .price-history-user-compact {
    color: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(255, 255, 255, 0.2);
  }
  
  .form-actions {
    border-top-color: #555555;
  }
  
  .delete-button {
    background: linear-gradient(135deg, #f44336, #d32f2f);
  }
  
  .delete-button:hover {
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
  }
  
  #edit-cancel {
    background: linear-gradient(135deg, #666666, #555555);
  }
  
  #edit-save {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
  }
  
  /* Readonly Fields im Dark Mode */
  .form-field input[readonly],
  .price-field input[readonly],
  .stock-field input[readonly] {
    background: linear-gradient(145deg, #333333 0%, #404040 100%);
    color: #999999;
    border-color: #555555;
  }
  
  .form-field input[readonly]:hover,
  .price-field input[readonly]:hover,
  .stock-field input[readonly]:hover {
    border-color: #555555;
  }
  
  /* Loading States im Dark Mode */
  .price-history-loading-compact {
    color: #cccccc;
  }
  
  .price-history-loading-compact::before {
    border-color: #555555;
    border-top-color: #ff6b6b;
  }
}

/* ===== ANIMATIONS ===== */
.article-section,
.form-field,
.price-field,
.stock-field {
  transition: all 0.3s ease;
}

.article-section:hover,
.form-field:hover,
.price-field:hover,
.stock-field:hover {
  transform: translateY(-1px);
}

/* ===== ACCESSIBILITY ===== */
.form-field input:focus,
.price-field input:focus,
.stock-field input:focus {
  outline: none;
}

.form-field label,
.price-field label,
.stock-field label {
  user-select: none;
  cursor: pointer;
}

/* ===== SPECIAL STYLES FOR READONLY FIELDS ===== */
.form-field input[readonly],
.price-field input[readonly],
.stock-field input[readonly] {
  background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
  color: #6c757d;
  border-color: #dee2e6;
  cursor: not-allowed;
  opacity: 0.8;
}

.form-field input[readonly]:hover,
.price-field input[readonly]:hover,
.stock-field input[readonly]:hover {
  border-color: #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transform: none;
}

/* ===== VALIDATION STYLES ===== */
.form-field input:invalid,
.price-field input:invalid,
.stock-field input:invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
  animation: shake 0.5s ease-in-out;
}

.form-field input:invalid:focus,
.price-field input:invalid:focus,
.stock-field input:invalid:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* ===== LOADING STATES ===== */
.price-history-loading-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
}

.price-history-loading-compact::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid #e9ecef;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 6px;
}

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