@charset "utf-8";

/* ==========================================================================
   หน้า Login (WMS / STOCK GENIUS) — ปรับใหม่ให้ดูทันสมัยขึ้น
   - การ์ดกลางจอ ฟอร์มซ้าย โลโก้ขวา
   - ช่องกรอกทรงมนพร้อมไอคอน + โฟกัสมีเส้นขอบไฮไลต์
   - ปุ่มเต็มความกว้าง โทนส้มตามโลโก้
   - รองรับปุ่มตาเทพ (แสดง/ซ่อนรหัสผ่าน) และ easyui combobox ของช่องคลัง
   ========================================================================== */

div.main {
    background: #0b1f4d;
    background: linear-gradient(135deg, #0a1b3f 0%, #123c8a 55%, #0a1b3f 100%);
    min-height: 100vh;
    width: 100%;
}

* {
    box-sizing: border-box;
}

body {
    color: #334155;
    font: 14px/1.5 'Open Sans', 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
}

a {
    color: #f5a623;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

input {
    font-family: inherit;
    -webkit-appearance: none;
}

.clearfix:before,
.clearfix:after {
    content: ' ';
    display: table;
}

.clearfix:after {
    clear: both;
}

.container {
    left: 50%;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 16px;
}

/* ---------- การ์ดกลาง ---------- */
.middle {
    display: flex;
    align-items: stretch;
    width: 720px;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    overflow: hidden;
    text-align: left;
}

/* ---------- ฝั่งฟอร์ม ---------- */
#login {
    display: block;
    width: 56%;
    padding: 40px 36px;
    border: 0;
}

.login-head {
    text-align: center;
    margin-bottom: 24px;
}

.login-head h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #0f2a5e;
    margin: 0 0 4px;
}

.login-head p {
    font-size: 12.5px;
    color: #8a97a8;
    margin: 0;
}

fieldset {
    padding: 0;
    border: 0;
    margin: 0;
}

#login form {
    width: 100%;
}

/* แต่ละแถวของช่องกรอก */
#login form p {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 0 14px;
    background: #f4f6fb;
    border: 1px solid #e2e8f2;
    border-radius: 12px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

#login form p:focus-within {
    background: #fff;
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, .15);
}

/* ไอคอนซ้าย (user / lock / laptop) */
#login form span.fa:not(.toggle-eye) {
    width: 46px;
    min-width: 46px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f6fed;
    font-size: 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    float: none;
}

#login form input[type="text"],
#login form input[type="password"] {
    flex: 1 1 auto;
    width: 100%;
    height: 48px;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 14px;
    padding: 0 12px 0 0;
    margin: 0;
    border-radius: 12px;
}

#login form input::placeholder {
    color: #9aa6b6;
}

#login form input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 100px #f4f6fb inset;
    -webkit-text-fill-color: #1f2937;
}

/* ปุ่มตาเทพ */
.toggle-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #2f6fed;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    width: auto;
    height: auto;
    background: none;
    float: none;
    z-index: 3;
}

.toggle-eye:hover {
    color: #12489e;
}

.has-eye input[type="password"],
.has-eye input[type="text"] {
    padding-right: 40px;
}

/* ปุ่มเข้าสู่ระบบ */
#login form div {
    margin-top: 6px;
}

#login form input[type="button"] {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #f5a623, #f0871f);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .5px;
    text-transform: none;
    box-shadow: 0 8px 18px rgba(240, 135, 31, .35);
    transition: transform .1s, box-shadow .15s, filter .15s;
}

#login form input[type="button"]:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 22px rgba(240, 135, 31, .45);
}

#login form input[type="button"]:active {
    transform: translateY(1px);
}

/* ---------- ฝั่งโลโก้ ---------- */
.logo {
    width: 44%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f2a5e, #1c4fb0);
    padding: 30px 20px;
    color: #fff;
    line-height: normal;
    border: 0;
}

.logo img {
    width: 160px;
    height: auto;
    max-width: 72%;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .3));
}

/* ---------- easyui combobox (ช่องคลังสินค้า) ให้กลืนกับดีไซน์ใหม่ ---------- */
#login form .combo,
#login form .textbox {
    flex: 1 1 auto;
    width: 100% !important;
    height: 48px !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 12px;
    line-height: 48px;
}

#login form .textbox .textbox-text {
    height: 48px !important;
    line-height: 48px;
    background: transparent;
    border: 0;
    font-size: 14px;
    color: #1f2937;
    padding: 0 12px 0 0;
}

#login form .combo .combo-arrow,
#login form .textbox .combo-arrow,
#login form .textbox .textbox-addon {
    height: 48px !important;
    background-color: transparent;
    line-height: 48px;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .container {
        position: absolute;
    }
    .middle {
        flex-direction: column;
        width: 400px;
    }
    #login,
    .logo {
        width: 100%;
    }
    .logo {
        order: -1;
        padding: 24px;
    }
    .logo img {
        width: 120px;
    }
    #login {
        padding: 28px 24px 32px;
    }
}
