* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f5f7fa;
  color: #333;
}

header {
  background: #1f2937;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

header h1 {
  margin: 0;
}

main {
  padding: 1rem;
}

#searchInput {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.6rem;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 0.9rem;
}

th {
  background: #f0f0f0;
}

tr:hover {
  background: #f9fafb;
}


button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  margin-bottom: 1rem;
}

button:hover {
  background: #1d4ed8;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 1rem;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
}

.modal-content input,select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
}

.error {
  color: #dc2626;
  font-size: 0.75rem;
  display: block;
  margin-top: 2px;
}



/* Remove default select arrow and add custom look */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='gray' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7l4.5 4.5L14.5 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  cursor: pointer;
}

/* Focus state */
input:focus,
select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}


.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: rgb(255, 0, 0);
  cursor: pointer;
  border-radius: 4px;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
