body {
  font-family: sans-serif;
  padding: 40px;
  max-width: 80%;
  margin: auto;
}

.nav-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.nav-bar a {
  text-decoration: none;
  color: #3498db;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}

.nav-bar a:hover {
  border-color: #3498db;
}

h1 {
  margin-bottom: 20px;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

input[type="text"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 60%;
}

button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #2980b9;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

.hidden {
  display: none;
}

#pagination {
  margin-top: 10px;
}

/* ---------- Modal overlay ---------- */

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

.modal-box {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  min-width: 320px;
  max-width: 480px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.modal-box input,
.modal-box select {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* Ưu tiên ẩn overlay khi có class hidden */
.modal-overlay.hidden {
  display: none;
}

/* ---------- Login page layout ---------- */

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6; /* nền xám nhẹ */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-box {
  background: #ffffff;
  padding: 32px 28px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
  max-width: 380px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.login-box h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.login-subtitle {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 14px;
  color: #6b7280;
}

.login-box input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
}

.login-box button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: #2563eb;
  color: #ffffff;
}

.login-box button:hover {
  opacity: 0.9;
}

.login-error {
  margin-top: 10px;
  color: #ef4444;
  font-size: 13px;
}
