/* assets/css/gustabe-login.css */
body.login {
    margin: 0; /* 🌟 เคลียร์ Margin เริ่มต้นของเบราว์เซอร์ที่ทำให้เกิด Scrollbar */
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* ชิดขวา */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
    overflow-x: hidden; /* 🌟 ป้องกัน Scrollbar แนวนอนเด็ดขาด */
}

/* ซ่อน Language Switcher */
.language-switcher, .wp-login-language {
    display: none !important;
}

body.login #login {
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 380px;
    margin: 0 8vw 0 auto; /* เว้นระยะห่างจากขอบขวา */
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box; /* 🌟 ป้องกันไม่ให้ Padding ดันกล่องจนทะลุจอ */
}

#loginform, .login form, #lostpasswordform {
    background: none;
    box-shadow: none;
    padding: 0;
    border: none !important;
    width: 100%;
    box-sizing: border-box;
}

#login h1 a {
    background-size: contain;
    background-position: center center;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.login label {
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
    width: 100%;
    display: block;
}

.login input[type="text"], .login input[type="password"] {
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    background: #fff;
    padding: 12px 14px;
    font-size: 16px;
    margin-top: 6px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: #2d3748;
    box-sizing: border-box; /* 🌟 ป้องกันกล่องพิมพ์ข้อความทะลุกรอบ */
}

.login input[type="text"]:focus, .login input[type="password"]:focus {
    border-color: #10d4b4;
    box-shadow: 0 0 0 3px rgba(16, 212, 180, 0.15);
    outline: none;
}

.login input[type="submit"] {
    background: #10d4b4;
    color: #fff;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 0;
    margin-top: 10px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(16, 212, 180, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
    text-shadow: none;
    box-sizing: border-box;
}

.login input[type="submit"]:hover {
    background: #0ebf9f;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(16, 212, 180, 0.25);
}

.login .forgetmenot { margin-bottom: 10px; width: 100%; }
.login .forgetmenot label { font-size: 13px; color: #718096; display: inline-block; width: auto; }

/* Custom Buttons & Credits */
.custom-login-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
}
.custom-login-buttons a {
    color: #4a5568 !important;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.custom-login-buttons a:hover {
    color: #10d4b4 !important;
    text-decoration: underline;
}
.credits {
    margin-top: 20px;
    font-size: 12px;
    color: #a0aec0;
    text-align: center;
    width: 100%;
}
.credits a { color: #718096; text-decoration: none; font-weight: 600; }
.credits a:hover { color: #10d4b4; }

/* Back Button for Lost Password */
.back-button-container { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; width: 100%; box-sizing: border-box; }
.back-button { padding: 12px 20px; background: #e2e8f0; color: #4a5568; border-radius: 8px; font-weight: 600; text-decoration: none; transition: all 0.2s ease;}
.back-button:hover { background: #cbd5e0; color: #2d3748; }
.back-button-container input[type="submit"] { margin: 0; flex: 1;}

/* Responsive (บน iPad และมือถือจะกลับมาอยู่ตรงกลางจอ) */
@media (max-width: 1024px) {
    body.login { justify-content: center; }
    body.login #login { margin: 0 auto; max-width: 400px; }
}

@media (max-width: 480px) {
    body.login { padding: 20px; align-items: flex-start; }
    body.login #login { padding: 30px 20px; width: 100%; max-width: 100%; }
    #login h1 a { width: 90px; height: 90px; }
}