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: 0;
  text-align: center;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background-color: transparent;
}

.logo {
  height: 50px;
}

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: 1200px;
  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;
}

.form-group input[type="text"],
.form-group 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;
}

.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: 30px;
  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: 100%; }


@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;
  }
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
}
.login-box {
  width: 100%;
  max-width: 600px;
  text-align: center;
  margin: 0;
}
.login-box h1 {
  color: #3066e0;
  font-size: 4.5rem;
  font-weight: bold;
  margin: 0;
}

.login-box h4 {
  color: #3066e0;
  font-weight: bold;
  font-size: 1.4rem;
  margin-top: 10px;
}

.form-input{
  margin: 0px 40px;
  padding: 20px 10px;
  border: none;
  border-radius: 50px;
  background-color: #d4d1d1;
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
  color: #333;
}

.form-footer{
  text-align: center;
}

.login-btn {
  background-color: #3a6ad6;
  color: white;
  padding: 15px 40px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}
.login-btn:hover {
  transition: 0.3s;
  background-color: #284796;
  padding: 15px 45px;
  color: rgb(110, 108, 108);
}

.bottom-right-text {
  position: fixed;
  bottom: 10px;
  right: 20px;
  font-size: 1.3rem;
  color: #0056b3;
  z-index: 1000;
}