#app-gifts {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  font-family: system-ui, -apple-system, sans-serif;
}

#app-gifts .gifts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

#app-gifts .gifts-title {
  margin: 0;
  font-size: 1.75rem;
  color: #1a1a1a;
}

#app-gifts .gifts-btn {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  min-height: 44px;
}

#app-gifts .gifts-btn-primary {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

#app-gifts .gifts-btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

#app-gifts .gifts-error {
  background: #f8d7da;
  color: #721c24;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

#app-gifts .gifts-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

#app-gifts .gifts-search,
#app-gifts .gifts-filter-status {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 44px;
}

#app-gifts .gifts-search {
  flex: 1;
  min-width: 200px;
}

#app-gifts .gifts-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

#app-gifts .gifts-item:hover {
  border-color: #007bff;
}

#app-gifts .gifts-item.gifts-purchased {
  opacity: 0.7;
  border-color: #28a745;
}

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

#app-gifts .gifts-item-title {
  margin: 0;
  font-size: 1.1rem;
  color: #1a1a1a;
}

#app-gifts .gifts-item-toggle {
  background: none;
  border: 1px solid #28a745;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #28a745;
  cursor: pointer;
  font-size: 0.8rem;
}

#app-gifts .gifts-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

#app-gifts .gifts-notes {
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
}

#app-gifts .gifts-empty {
  text-align: center;
  color: #666;
  padding: 2rem;
  font-style: italic;
}

#app-gifts .gifts-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

#app-gifts .gifts-editor-title {
  margin: 0;
  font-size: 1.5rem;
}

#app-gifts .gifts-form-group {
  margin-bottom: 1rem;
}

#app-gifts .gifts-form-row {
  display: flex;
  gap: 1rem;
}

#app-gifts .gifts-form-row .gifts-form-group {
  flex: 1;
}

#app-gifts .gifts-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: #1a1a1a;
}

#app-gifts .gifts-input,
#app-gifts .gifts-select,
#app-gifts .gifts-textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  min-height: 44px;
}

#app-gifts .gifts-textarea {
  resize: vertical;
  min-height: 80px;
}

#app-gifts .gifts-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

#app-gifts .gifts-checkbox {
  width: 18px;
  height: 18px;
}

#app-gifts .gifts-details {
  margin: 1rem 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#app-gifts .gifts-summary {
  padding: 0.75rem;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

#app-gifts .gifts-details[open] .gifts-summary {
  border-bottom: 1px solid #ddd;
}

#app-gifts .gifts-details > *:not(.gifts-summary) {
  padding: 0 0.75rem;
}

#app-gifts .gifts-details > .gifts-form-group:last-child {
  padding-bottom: 0.75rem;
}

#app-gifts .gifts-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  #app-gifts {
    padding: 0.75rem;
  }
  
  #app-gifts .gifts-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  #app-gifts .gifts-filters {
    flex-direction: column;
  }
  
  #app-gifts .gifts-form-row {
    flex-direction: column;
  }
  
  #app-gifts .gifts-item-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  #app-gifts .gifts-form-actions {
    flex-direction: column;
  }
}