* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
}

.app {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
}

.app-header {
  margin-bottom: 2rem;
}

.app-header h1 {
  font-size: 2.5rem;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.app-header p {
  color: #94a3b8;
  font-size: 1.1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-card.critical-card {
  border-color: #ef4444;
}

.stat-card.low-card {
  border-color: #fbbf24;
}

.stat-label {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
}

.stat-value.critical {
  color: #ef4444;
}

.stat-value.low {
  color: #fbbf24;
}

.stat-value.value {
  color: #10b981;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 1rem;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: #1e293b;
  border: 2px solid #334155;
  color: #cbd5e1;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #334155;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.category-select {
  padding: 0.75rem 1.25rem;
  background: #1e293b;
  border: 2px solid #334155;
  color: #f8fafc;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}

.category-select:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-primary {
  padding: 0.875rem 1.5rem;
  background: #3b82f6;
  border: none;
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.btn-primary:hover {
  background: #2563eb;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.inventory-card {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s;
}

.inventory-card.critical {
  border-color: #ef4444;
}

.inventory-card.low {
  border-color: #fbbf24;
}

.inventory-card.good {
  border-color: #10b981;
}

.inventory-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.item-header h3 {
  color: #f8fafc;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.category-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: #334155;
  color: #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge {
  font-size: 1.5rem;
}

.stock-bar {
  height: 8px;
  background: #334155;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.stock-fill {
  height: 100%;
  transition: width 0.3s;
}

.stock-fill.good {
  background: #10b981;
}

.stock-fill.low {
  background: #fbbf24;
}

.stock-fill.critical {
  background: #ef4444;
}

.stock-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #334155;
}

.current-stock {
  color: #f8fafc;
  font-weight: 700;
  font-size: 1.125rem;
}

.par-level {
  color: #94a3b8;
  font-size: 0.875rem;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 0.875rem;
}

.detail-row .value {
  color: #cbd5e1;
  font-weight: 600;
}

.item-actions {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  flex: 1;
  padding: 0.75rem;
  background: #334155;
  border: none;
  color: #cbd5e1;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #475569;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  font-size: 1.125rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
}
