/* --- file: login.css --- */
body {
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Container ของ Input */
.form-group {
    margin-bottom: 1.5rem;
    position: relative; /* สำหรับให้ลูกตาอ้างอิงตำแหน่ง */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    padding-right: 45px; /* เว้นที่ด้านขวาเพิ่มขึ้นอีกนิดกันตัวหนังสือบัง */
    border: 1px solid #dce4ec;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); /* เพิ่ม Glow เบาๆ เวลา Focus */
}

/* 👁️ ส่วนของปุ่มลูกตา */
#togglePassword {
    position: absolute;
    right: 12px;
    /* คำนวณให้อยู่กึ่งกลางเฉพาะตัวช่อง Input (ไม่รวม Label) */
    bottom: 12px; 
    cursor: pointer;
    font-size: 18px;
    color: #95a5a6;
    transition: all 0.2s;
    user-select: none;
    line-height: 1; /* กันขนาดบรรทัดดีด */
    display: flex;
    align-items: center;
}

#togglePassword:hover {
    color: #3498db;
    transform: scale(1.15);
}

#togglePassword:active {
    transform: scale(0.9); /* ย่อตัวเล็กน้อยเวลาคลิกให้ความรู้สึกเหมือนปุ่มจริง */
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-login:hover {
    background-color: #2980b9;
}

.btn-login:active {
    transform: translateY(1px);
}

#error-msg {
    color: #e74c3c;
    background: #fdeaea;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 14px;
    display: none;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 12px;
    color: #bdc3c7;
}