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

html,
body {
  width: 100%;
  min-height: 100vh;
  background: #f5f5f5;
  font-family: sans-serif;
}

main {
  width: 95%;
  margin: auto;
  padding: 30px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
  background-color: rgb(29, 72, 34);
  color: white;
}

#toggle {
  padding: 10px 20px;
  border: none;
  background: white;
  color: #222;
  border-radius: 6px;
  cursor: pointer;
}

.task-form {
  width: 320px;
  flex-shrink: 0;

  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select {
  flex: 1;
  padding: 12px;
  border: 1px solid lightgray;
  border-radius: 5px;
}

#add {
  padding: 12px 20px;
  border: none;
  background-color: green;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.hero {
  display: flex;
  align-items: flex-start;
  margin-top: 25px;
  gap: 2rem;
}

.task-container {
  flex: 1;

  display: flex;
  flex-direction: column;
  gap: 1rem;

  margin-top: 0;
}

.search-task {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid lightgray;
  border-radius: 20px;
  margin-bottom: 5px;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;

  max-height: 350px;
  overflow-y: auto;
}

.task-card {
  background: white;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 1rem 1.25rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  transition: all 0.2s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.task-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  padding: 0.2rem 0.3rem;
}

.category {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.5rem 0.8rem;
  border-radius: 50px;
  background: #eef2ff;
  color: #4f46e5;
}

.actions {
  display: flex;
  align-items: center;
  width: auto;
  gap: 0.5rem;
  margin-top: 0;
}

.actions button {
  padding: 10px 15px;
  border: none;
  outline: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.2s;
}

.edit-btn {
  background: #fef3c7;
  color: #92400e;
}

.edit-btn:hover {
  background: #fde68a;
}

.delete-btn {
  background: #fee2e2;
  color: #b91c1c;
}

.delete-btn:hover {
  background: #fecaca;
}

.done-badge {
  display: inline-block;
  background-color: #22c55e;
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  
}

.event-propagation {
  margin-top: 30px;
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pipeline {
  margin-top: 30px;
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/** dark theme */
body.dark {
  background: #0f172a;
  color: white;
} 

body.dark .task-form,
body.dark .task-container,
body.dark .task-card,
body.dark .event-propagation,
body.dark .pipeline  {
  background: #1e293b;
  color: white;
}

body.dark nav {
  background: #14532d;
}

body.dark input,
body.dark select {
  background: #334155;
  color: white;
  border: 1px solid #475569;
}

body.dark .category {
  background: #312e81;
  color: #c7d2fe;
}

body.dark h2 {
  color: white;
}

body.dark .elem {
  background: #334155;
  border-color: #475569;
  color: white;
}

body.dark .grandparent {
  background: #1e3a8a;
}

body.dark .parent {
  background: #2563eb;
}

body.dark .pipeline-notes {
  background: #1e293b;
  color: white;
  padding: 20px;
  border-radius: 20px;
}

body,
nav,
.task-form,
.task-card,
.event-propagation,
.pipeline,
input,
select {
  transition: all 0.3s ease;
}

body.dark .pipeline {
  background: #1e293b;
}

.event-propagation {
 display: flex;
 flex-direction: column;
 padding: 20px;
 gap: 20px;
}

.event-propagation h3 {
  text-align: center;
}

.grandparent {
  padding: 40px;
  background: #dbeafe;
}

.parent {
  padding: 30px;
  background: #bfdbfe;
  margin-top: 20px;
}

.child-btn {
  padding: 10px 20px;
  margin-top: 20px;
  cursor: pointer;
}

.pipeline {
  margin-top: 30px;
  background: rgba(135, 155, 139, 0.818);
  padding: 25px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.pipeline h3 {
  margin-bottom: 20px;
}

.pipeline .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.elem {
  width: 250px;
  text-align: center;
  padding: 15px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  font-weight: 600;
}

.down {
  font-size: 24px;
  font-weight: bold;
}

.pipeline-notes {
  margin-top: 25px;
  line-height: 1.8;
}

.pipeline-notes p {
  margin-bottom: 8px;
}