* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

::selection {
  background-color: orange;
  color: white;
}

::-moz-selection {
  background-color: orange;
  color: white;
}

body {
  background: #f5f7fa;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: auto;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.card {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  animation: scaleIn 0.4s ease;
  overflow-x: auto;
}

h2 {
  margin-bottom: 15px;
}

.form-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  margin-top: 10px;
  padding: 10px;
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.error {
  color: red;
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

tr {
  animation: fadeSlide 0.3s ease;
}

.badge {
  padding: 5px 10px;
  border-radius: 5px;
  color: white;
  font-size: 14px;
  animation: scaleIn 0.3s ease;
}

.green { background: #16a34a; }
.blue { background: #2563eb; }
.yellow { background: #facc15; color: #000; }
.red { background: #dc2626; }

.edit-btn {
  background: #f59e0b;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  color: white;
  cursor: pointer;
  margin-right: 5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.delete-btn {
  background: #dc2626;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edit-btn:hover,
.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.total {
  margin-top: 10px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .form-group {
    flex-direction: column;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  td {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #555;
  }

  .edit-btn,
  .delete-btn {
    width: 48%;
    margin: 4px 0;
  }
}
