* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 1rem;
  background-color: #f4f4f4;
  color: #333;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}
h5 {
  text-align: center;
  color: #cacaca;

}


form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

form input,
form select,
form button {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 140px;
}

form button {
  background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

form button:hover {
  background-color: #2980b9;
}

#file-input,
#export-btn,
#search-input {
  display: block;
  margin: 0.5rem auto;
  max-width: 90%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  margin-top: 1rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

thead {
  background-color: #3498db;
  color: white;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 0.95rem;
}

td button {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

td button:hover {
  background-color: #c0392b;
}

/* Responsive for small screens */
@media screen and (max-width: 768px) {
  form {
    flex-direction: column;
    align-items: stretch;
  }

  table, thead, tbody, th, td, tr {
    display: block;
    background-color: #f4f4f4;
  }

  thead {
    display: none;
  }

  tr {
    border: 1px solid #ccc;
    margin-bottom: 1rem;
    border-radius: 6px;
    padding: 0.5rem;
    background-color: #fff;
  }

  td {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    background-color: #fff;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    width: 40%;
    color: #555;
  }
}
/* @media screen and (max-width: 768px) {
  td[data-label="Actions"] {
    display: none;
  }

  th:last-child {
    display: none;
  }
} */


/* Modal backdrop */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

/* Show modal */
.modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* Modal box */
.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  padding: 25px 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease forwards;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Slide down animation */
@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Heading */
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 1.3rem;
  color: #222;
  text-align: center;
}

/* Details list */
#confirm-details {
  list-style: none;
  padding-left: 0;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 25px;
  color: #444;
}

#confirm-details li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

/* Modal buttons container */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Buttons common style */
.btn {
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
  user-select: none;
}

/* Confirm button - green */
.btn-confirm {
  background-color: #28a745;
  color: white;
}

.btn-confirm:hover {
  background-color: #218838;
}

/* Cancel button - gray */
.btn-cancel {
  background-color: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background-color: #5a6268;
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .modal-content {
    padding: 20px 18px;
  }
  
  .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 10px 0;
  }
  
  .modal-actions {
    gap: 12px;
  }
}
