/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, sans-serif;
}

body {
  background: #f8fafc;
  color: #333;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #938eed, #938eed);
  color: white;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

header .subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

nav.tabs {
  display: flex;
  justify-content: center;
  background: #eef2ff;
  padding: 0.5rem;
  gap: 0.5rem;
  
}

nav.tabs button {
  background: white;
  border: 1px solid #c7d2fe;
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: 0.3s;
  color: #938eed; 
}
nav.tabs button:hover {
  background: #e0e7ff;
}


nav.tabs button.active {
  background: #938eed;
  color: white;
  border-color: #8a85f0;
}

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

.section {
  display: none;
}

.section.active {
  display: block;
}

.card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-3px);
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #111827;
}

form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button {
  background: #938eed;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.3s;
}

button:hover {
  background: #938eed;
}

button.edit-btn {
  background: #059669;
}

button.edit-btn:hover {
  background: #047857;
}

button.complete-btn {
  background: #2563eb;
}

button.complete-btn:hover {
  background: #1d4ed8;
}

.badge {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: #10b981;
  color: white;
  border-radius: 9999px;
  font-size: 0.8rem;
}

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

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

button.delete-btn {
  background: #dc2626; 
}

button.delete-btn:hover {
  background: #b91c1c;
}
button.delete-task-btn {
  background: #dc2626;  
}

button.delete-task-btn:hover {
  background: #b91c1c;
}