/* style.css */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f4f9;
  margin: 0;
  padding: 0;
  color: #333;
}

header {
  background-color: #4CAF50;
  color: white;
  padding: 1rem;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

main {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.input-group,
.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex: 1;
  min-width: 0;
}

button {
  padding: 8px 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button.edit-btn {
  background-color: #ffc107;
  /* Amber */
  padding: 4px 8px;
  font-size: 0.8rem;
  margin-left: 10px;
}

button.delete-btn {
  background-color: #ff5252;
  padding: 4px 8px;
  font-size: 0.8rem;
  margin-left: 5px;
}

.primary-btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 12px;
}

.secondary-btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 12px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  background: #e0e0e0;
  padding: 5px 10px;
  border-radius: 15px;
  display: flex;
  align-items: center;
}

.item-row {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  flex-wrap: wrap;
}

.item-assignees {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.assignee-checkbox {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  background: #f9f9f9;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 1.1rem;
}

.mini-btn {
  padding: 2px 6px;
  font-size: 0.75rem;
  background-color: #9e9e9e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .card {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode input {
  background-color: #2d2d2d;
  border: 1px solid #444;
  color: #e0e0e0;
}

body.dark-mode .tag,
body.dark-mode .assignee-checkbox {
  background-color: #333;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-mode .item-row,
body.dark-mode .result-row {
  border-bottom-color: #333;
}

.history-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-info {
  flex: 1;
}

.history-date {
  font-weight: bold;
  font-size: 0.9rem;
}

.history-total {
  font-size: 0.85rem;
  opacity: 0.8;
}