/* พื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  

  body {
    font-family: 'Sarabun', sans-serif; /* หรือ 'K2D', sans-serif */
    background: linear-gradient(to bottom right, blue, pink);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
  }

  .container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* สไตล์ตาราง */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px;
    font-size: 1rem;
}

th {
    background-color: #4e54c8;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #ddd;
}

/* ขอบตาราง */
table, th, td {
    border: 1px solid #ddd;
}

/* เพิ่มการปรับแต่งเมื่อมุ่งไปที่แถว */
tr:hover {
    background-color: #e1e1e1;
    cursor: pointer;
}
  
  /* พื้นหลังแบบ Gradient ทแยงมุม */
  .diagonal-gradient {
    background: linear-gradient(to bottom right, blue, pink);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* ฟอร์ม */
  .form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: 100%; /* ฟอร์มจะขยายตามความกว้างของหน้าจอ */
    background-color: #fff;
    padding: 20px;
    border-radius: 20px;
    position: relative;
    
  }   
  .title {
    font-size: 28px;
    color: royalblue;
    font-weight: 600;
    letter-spacing: -1px;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 30px;
  }
  
  .title::before,.title::after {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    border-radius: 50%;
    left: 0px;
    background-color: royalblue;
  }
  
  .title::before {
    width: 18px;
    height: 18px;
    background-color: royalblue;
  }
  
  .title::after {
    width: 18px;
    height: 18px;
    animation: pulse 1s linear infinite;
  }
  
  .message, .signin {
    color: rgba(88, 87, 87, 0.822);
    font-size: 14px;
  }
  .messages {  
    text-align: left; /* ชิดซ้าย */
    font-size: 16px; /* Set font size to 16 pixels */  
    font-weight: bold; /* Make the text bold */ 
  }  
  
  .signin {
    text-align: center;
  }
  
  .signin a {
    color: royalblue;
  }
  
  .signin a:hover {
    text-decoration: underline royalblue;
  }

  /* ปุ่ม "เข้างาน" */ 
  .btn-check-in {
    background-color: #4CAF50;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
    margin-bottom: 10px; /* เพิ่มระยะห่างระหว่างปุ่ม */
  }
  
  .btn-check-in:hover {
    background-color: #45a049; /* สีเมื่อชี้เมาส์ */
  }
  
  /* ปุ่ม "เลิกงาน" สีแดง */
  .btn-check-out {
    background-color: #f44336;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
  }
  
  .btn-check-out:hover {
    background-color: #d32f2f; /* สีเมื่อชี้เมาส์ */
  }
  
  
  .form .title, .form .signin, .submit ,.btn-check-in,.btn-check-out{
    font-family: 'K2D', sans-serif; /* ใช้ฟอนต์ K2D */
  }

  
  .flex {
    display: flex;
    width: 100%;
    gap: 6px;
  }
  
  .form label {
    position: relative;
  }
  
  .form label .input {
    width: 100%;
    padding: 10px 10px 20px 10px;
    outline: 0;
    border: 1px solid rgba(105, 105, 105, 0.397);
    border-radius: 10px;
  }
  
  .form label .input + span {
    position: absolute;
    left: 10px;
    top: 15px;
    color: grey;
    font-size: 0.9em;
    cursor: text;
    transition: 0.3s ease;
  }
  
  .form label .input:placeholder-shown + span {
    top: 15px;
    font-size: 0.9em;
  }
  
  .form label .input:focus + span,.form label .input:valid + span {
    top: 30px;
    font-size: 0.7em;
    font-weight: 600;
  }
  
  .form label .input:valid + span {
    color: green;
  }
  
  .submit {
    border: none;
    outline: none;
    background-color: royalblue;
    padding: 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transform: .3s ease;
  }
  
  .submit:hover {
    background-color: rgb(56, 90, 194);
  }

  
  
  @keyframes pulse {
    from {
      transform: scale(0.9);
      opacity: 1;
    }
  
    to {
      transform: scale(1.8);
      opacity: 0;
    }
  }
  
  
  /* Bottom Navigation */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
  }
  
  .nav-item {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
    transition: color 0.3s;
    text-decoration: none;
  }
  
  .nav-item .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
    color: #4e54c8;
  }
  
  .nav-item:hover {
    color: #4e54c8;
  }
  
  .nav-item.active .icon {
    color: #ff7e5f;
  }
  
    /* ปรับขนาดเมื่อหน้าจอเล็กกว่า 768px */
    @media (max-width: 768px) {
        .form {
        width: 100%; /* ขนาดฟอร์มลดลงเหลือ 90% ของหน้าจอ */
        padding: 15px; /* ลด padding */
        }
    }