html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Noto Sans Thai', sans-serif;
  background-color: #ffffff;
  background-image: url('../bg.png'); /* << ใส่ path รูปตรงนี้ */
  background-size: cover;      /* ให้รูปเต็มหน้าจอ */
  background-position: center; /* จัดตำแหน่งกลาง */
  background-repeat: no-repeat; /* ไม่ให้ซ้ำ */
  background-attachment: fixed;
  margin: 0;
  padding: 10px;
  text-align: center;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background-color: transparent;
}

.logo {
  height: 40px;
}

nav a {
  margin-left: 24px;
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

nav a.active {
  background-color: #3a6ad6;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
}

main {
  text-align: center;
  padding: 20px 20px;
}

main h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.reg-button {
  background-color: #eeeeee;
  color: #3a6ad6;
  font-weight: bold;
  font-size: 1.2rem;
  text-decoration: none;
  padding: 40px 20px;
  border-radius: 20px;
  width: 260px;
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.container {
  max-width: 2400px;
  margin: auto;
  padding: 0px 20px;
}

h1 {
  font-size: 2.5rem;
  color: #3a6ad6;
  margin-bottom: 40px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  text-align: left;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
  color: #000;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  border: none;
  background-color: #e6e6e6;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
  appearance: none;
}

.file-upload {
  display: flex;
  gap: 10px;
  align-items: center;
}

.file-upload input[type="text"] {
  flex: 1;
  background-color: #e6e6e6;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
}

.file-btn {
  background-color: #3a6ad6;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.file-btn:hover {
  background-color: #2f55b3;
}
.file-upload.excel{
  display: inline;
  gap: 10px;
  align-items: center;
}

.submit-btn {
  background-color: #3a6ad6;
  color: white;
  padding: 15px 40px;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 30px;
}

.submit-btn:hover {
  background-color: #2f55b3;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: #3a6ad6;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}

.history-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: auto;
  padding: 100 40px;
}

.history-row {
  display: flex;
  gap: 10px;
}

.history-row .cell {
  padding: 16px;
  border-radius: 12px;
  background-color: #f0f0f0;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* หัวตาราง */
.history-row.header .cell {
  background-color: #d9d9d9;
  font-weight: 700;
}

/* กล่องข้อมูลเทา */
.history-row:not(.header) .cell.skeleton {
  background-color: #e0e0e0;
  height: 160px;
}

/* กำหนดความกว้างแต่ละคอลัมน์ */
.cell.col-1 { width: 10%; }
.cell.col-2 { width: 25%; }
.cell.col-3 { width: 20%; }
.cell.col-4 { width: 15%; }
.cell.col-5 { width: 15%; }
.cell.col-6 { width: 15%; }

.cell.col-7 { width: 5%; }
.cell.col-8 { width: 15%; }
.cell.col-9 { width: 40%; }
.cell.col-10 { width: 30%; }
.cell.col-11 { width: 9%; }
.cell.col-12 { width: 5%; }




@media (max-width: 768px) {
  .container,
  .history-table {
    padding: 0 20px;
  }
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.profile-section img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  background-color: #0056b3;
}

.form-wrapper {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

form.personal-info-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

form.personal-info-form .form-group {
  display: flex;
  flex-direction: column;
}

form.personal-info-form .form-group.full-width {
  grid-column: span 2;
}

form.personal-info-form label {
  font-weight: bold;
  margin-bottom: 6px;
}

form.personal-info-form input[type="text"] {
  padding: 14px;
  border: none;
  border-radius: 10px;
  background-color: #d9d9d9;
  font-size: 1rem;
}

@media (max-width: 768px) {
  form.personal-info-form {
    grid-template-columns: 1fr;
  }

  form.personal-info-form .form-group.full-width {
    grid-column: span 1;
  }
}
.search-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}


.search-button {
  background-color: #3a6ad6;
  color: white;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

.search-button:hover {
  background-color: #2f55b3;
}


.cancel-btn {
  background-color: #d63a3a;
  color: white;
  padding: 15px 40px;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 30px;
}

.cancel-btn:hover {
  background-color: #b52e2e;
}

.btn-export {
  font-family: 'Prompt', sans-serif;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}


.btn-export.excel {
  background-color: #28a745;
  color: white;
}
.btn-export.pdf {
  background-color: #dc3545;
  color: white;
}
.export{
  display: inline-flex;
  justify-content: space-between;
}  
.btn-edit {
  background-color: #4CAF50; 
  color: white;
  border: none;
  font-size: 16px;
  border-radius: 0.5rem;
}
.btn-edit:hover{
  background-color: #018943; 
}

.btn-delete {
  background-color: #f44336; 
  color: white;
  border: none;
  font-size: 16px;
  border-radius: 0.5rem;
}
.btn-delete:hover{
  background-color: #ce0101;
  
}