* { box-sizing: border-box; }
body {
    font-family: var(--font, 'Prompt', sans-serif);
    margin: 0;
    /* คงพื้นหลังรวมของหน้าจอไว้คล้ายเดิม หรือปรับให้เข้ากับธีม */
    background: linear-gradient(135deg, var(--blue-950, #0a173a) 0%, var(--primary, #1e3a8a) 45%, var(--green-700, #064e3b) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-card {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 960px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

/* ── Left brand panel ── */
.login-brand-panel {
    flex: 1;
    min-width: 320px;
    /* ปรับให้ไล่สีจากซ้าย (ขาว) ไปขวา (น้ำเงินเข้ม) แบบรูปตัวอย่าง */
    background: linear-gradient(94deg, #ffffff 40%, #0a173a 140%); 
    color: #0a173a;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.login-logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: transparent; /* นำพื้นหลังกรอบใสออก */
    border-radius: 14px;
    padding: 0;
    width: fit-content;
    margin-bottom: 32px;
}

.login-logo-row img { 
    width: 120px; 
    height: auto; 
    max-height: 120px; 
    object-fit: contain; 
}

.login-brand-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #0a173a;
}
.login-brand-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #cf983e; /* ใช้สีทองตกแต่ง */
    margin-bottom: 18px;
}
.login-brand-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
    max-width: 360px;
}
.login-brand-footer {
    font-size: 12.5px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

/* ── Right form panel (ปรับเป็นพื้นสีน้ำเงินเข้มตามรูป) ── */
.login-form-panel {
    flex: 1;
    min-width: 320px;
    background: #0a173a; /* สีพื้นหลังหลักของฟอร์ม */
    color: #ffffff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}
.login-form-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 28px;
}

.login-error {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-field { margin-bottom: 18px; }
.login-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff; /* ปรับข้อความ Label เป็นสีขาว */
    margin-bottom: 8px;
}
.login-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    font-family: var(--font, 'Prompt', sans-serif);
    font-size: 14px;
    background: #ffffff;
    color: #0f172a;
    transition: 0.2s;
}
.login-field input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(207, 152, 62, 0.4); /* เงาสีทองเมื่อกดช่องกรอกข้อมูล */
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #cf983e; /* สีปุ่มสีทอง */
    color: #1a1a1a;
    font-family: var(--font, 'Prompt', sans-serif);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: 0.2s;
}
.login-submit-btn:hover {
    transform: translateY(-2px);
    background: #ffdb87;
    box-shadow: 0 10px 20px rgba(207, 152, 62, 0.35);
}

.login-form-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 768px) {
    .login-card { border-radius: 16px; }
    .login-brand-panel, .login-form-panel { padding: 36px 28px; }
}