body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fafafa;
  text-align: center;
}

.header {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  background: #333;
}

.header form {
  display: flex;
  gap: 5px;
}

.header input {
  padding: 5px;
  font-size: medium;
}

.header button {
  padding: 5px 10px;
  font-size: medium;
  cursor: pointer;
}

.logout {
  background: white;
  color: #333;
  border: 1px solid #aaa;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}


.logout:hover {
  background: #f0f0f0;
}

.sum {
  margin: 30px 0;
  font-size: 1.5em;
}

.red-btn {
  background: #d33;
  color: white;
  border: none;
  padding: 20px 40px;
  font-size: 1.3em;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease;
  margin-top: 20px;
  margin-bottom: 50px;
  
}

.red-btn:hover {
  background: #b11;
  transform: scale(1.05);
}

.header-title{
  color: white;
  margin-right: auto;
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 0;
}

.events {
  width: 60%;
  margin: 0 auto;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center; align-items: center;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  min-width: 300px;
}

.popup-content input {
  display: block;
  margin: 10px auto;
  padding: 8px;
  width: 80%;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}


#total-sum {
  transition: color 0.3s ease, transform 0.3s ease;
}

#total-sum.updating {
  color: #28a745;
  transform: scale(1.1);
}

.toast {
  font-size: 25px;
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  opacity: 0;
  transition: bottom 0.4s ease, opacity 0.4s ease;
  z-index: 9999;
}

.toast.show {
  bottom: 30px;
  opacity: 1;
}