*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px;
  color: #333;
  background: #f8f9fa;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#searchBox {
  padding: 7px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  width: 220px;
  outline: none;
}

#searchBox:focus {
  border-color: #80bdff;
}

#addNewRecordButton {
  padding: 7px 16px;
  background: #0366d6;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

#addNewRecordButton:hover {
  background: #025bb5;
}

/* ── Table ────────────────────────────────────────────────────────────────── */

.table-wrapper {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
}

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

thead {
  background: #f1f3f5;
}

th,
td {
  padding: 9px 8px;
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  font-weight: 700;
  border-bottom-width: 2px;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:nth-child(even) td {
  background: #fafbfc;
}

/* ── Action icons ─────────────────────────────────────────────────────────── */

.action-icon {
  display: inline-block;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 14px;
  margin-right: 4px;
  background: none;
  border: none;
}

.action-icon:hover {
  background: #e9ecef;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.pagination-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  font-size: 13px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 5px 14px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pagination-btn:not(:disabled):hover {
  background: #e9ecef;
}

.page-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rows-per-page {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rows-per-page label {
  font-size: 13px;
  color: #666;
}

select[aria-label="rows per page"] {
  padding: 4px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

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

[data-cy="registration-modal"] {
  background: #fff;
  border-radius: 6px;
  min-width: 460px;
  max-width: 90vw;
}

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.modal-body {
  padding: 16px 20px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #dee2e6;
  text-align: right;
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.field-group input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.field-group input:focus {
  border-color: #80bdff;
}

#submit {
  padding: 7px 20px;
  background: #0366d6;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

#submit:hover {
  background: #025bb5;
}

.btn-cancel {
  padding: 7px 16px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 8px;
}
