* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  width: 100%;
  height: 100vh;
  /* overflow: hidden; */
  padding: 10px;
}

.wrapper {
  background: #fff;
  width: 80%;
  margin: 120px auto;
  padding: 25px;
  border-radius: 5px;
  box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
}

.wrapper header {
  font-size: 30px;
  font-weight: 600;
}

.wrapper .footer {
  display: flex;
  width: 100%;
  margin-top: 20px;
  align-items: center;
  justify-content: space-between;
}

.taskList {
  margin-top: 10px;
}

.taskListHeader {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1.4fr) 160px 120px 220px;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #565c65;
}

.cardRow {
  padding: 2px;
}

.drag-ghost {
  opacity: 0.4;
}
.drag-chosen {
  outline: 2px dashed #888;
}
.drag-dragging {
  cursor: grabbing;
}

.taskCard {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1.4fr) 160px 120px 220px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  border-radius: 5px;
  border: 1px solid #808080;
  padding: 10px;
}

.taskCard--high {
  background: #fff3b0;
  border-color: #e3b505;
}

.taskCard > .dragIcon i {
  color: #565c65;
}

.actionBtn {
  padding: 5px;
  justify-self: end;
}

.actionBtn button {
  border: none;
  outline: none;
  transition: all 0.3s ease;
  padding: 7px 10px;
}

button {
  opacity: 0.7;
  cursor: pointer;
}

button:hover {
  opacity: 1;
}

.edit {
  background: #04aa6d;
  border-radius: 2px;
  color: white;
}

.remove {
  background: #ff0000;
  border-radius: 2px;
  color: white;
}

.footer button {
  padding: 6px 10px;
  border-radius: 3px;
  border: none;
  outline: none;
  color: #fff;
  font-weight: 400;
  font-size: 16px;
  margin-left: 5px;
  background: #1f4eda;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.footer button:hover {
  opacity: 1;
  pointer-events: auto;
}

.name {
  font-weight: 500;
}

.date,
.price {
  color: #3f4650;
}

#newTask {
  position: fixed;
  inset: 0;
  border: none;
  border-radius: 8px;
  padding: 20px;
  width: min(92vw, 420px);
  margin: auto;
  height: fit-content;
}

#newTask[open] {
  display: block;
}

#newTask::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.taskForm {
  display: grid;
  gap: 10px;
}

.taskForm input {
  padding: 8px;
  border: 1px solid #b8b8b8;
  border-radius: 4px;
}

.dialogActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.dialogActions button {
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
}

.dialogActions button[type="submit"] {
  background: #1f4eda;
  color: #fff;
}

#msg[data-tipo="sucesso"] {
  color: #0a7a2f;
}
#msg[data-tipo="erro"] {
  color: #b00020;
}
#msg[data-tipo="info"] {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .wrapper {
    width: 100%;
    margin: 24px auto;
  }

  .taskListHeader {
    display: none;
  }

  .taskCard {
    grid-template-columns: 24px 1fr;
    gap: 8px 12px;
  }

  .name {
    grid-column: 2;
  }

  .date {
    grid-column: 2;
    font-size: 14px;
  }

  .price {
    grid-column: 2;
    font-weight: 600;
  }

  .actionBtn {
    grid-column: 2;
    justify-self: start;
    padding: 0;
  }
}
