﻿@font-face {
    font-family: 'Khmer MEF1';
    src: url('../fonts/KhmerMEF1.eot') format('embedded-opentype'), 
         url('../fonts/KhmerMEF1.woff2') format('woff2'), 
         url('../fonts/KhmerMEF1.woff') format('woff'), 
         url('../fonts/KhmerMEF1.ttf') format('truetype'), 
         url('../fonts/KhmerMEF1.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Khmer MEF2';
    src: url('../fonts/KhmerMEF2.eot') format('embedded-opentype'), 
         url('../fonts/KhmerMEF2.woff2') format('woff2'), 
         url('../fonts/KhmerMEF2.woff') format('woff'), 
         url('../fonts/KhmerMEF2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

*:focus {
    outline: none;
}

body.login-body {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d3b66 0%, #1e5288 50%, #2a69ac 100%);
    font-family: 'Kantumruy Pro', 'Suwannaphum', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(13, 59, 102, 0.25), 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 38px 32px 28px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

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

.logo-box {
    margin-bottom: 16px;
}

.login-logo {
    max-width: 200px;
    height: auto;
    border-radius: 6px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    font-family: 'Kantumruy Pro', 'Moul', sans-serif;
}

.login-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

.error-message {
    display: none;
    margin: 0 0 20px 0;
    padding: 11px 16px;
    color: #b91c1c;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 13.5px;
    text-align: center;
    width: 100%;
    line-height: 1.5;
    box-sizing: border-box;
}

.error-message.show-error {
    display: block;
}

.form-group-custom {
    margin-bottom: 20px;
    text-align: left;
}

.form-label-custom {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-prefix-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.form-input-custom {
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    font-size: 14.5px;
    font-family: 'Kantumruy Pro', 'Suwannaphum', sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.form-input-custom.has-prefix {
    padding-left: 42px;
}

.form-input-custom.has-suffix {
    padding-right: 44px;
}

.form-input-custom:focus {
    background-color: #ffffff;
    border-color: #1e5288;
    box-shadow: 0 0 0 3px rgba(30, 82, 136, 0.15);
}

.input-icon-group:focus-within .input-prefix-icon {
    color: #1e5288;
}

.form-input-custom::placeholder {
    color: #94a3b8;
    font-size: 13.5px;
}

.btn-toggle-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.btn-toggle-eye:hover {
    color: #1e5288;
    background-color: #edf2f7;
}

.btn-toggle-eye:focus {
    outline: none;
}

.val-msg {
    color: #ef4444;
    font-size: 12.5px;
    margin-top: 5px;
    font-weight: 500;
}

.val-msg:empty {
    display: none !important;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.remember-label {
    margin: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #475569;
    user-select: none;
}

.remember-checkbox input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #1e5288;
    margin: 0;
}

.btn-login-submit {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #1e5288 0%, #2a69ac 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(30, 82, 136, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Kantumruy Pro', sans-serif;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #163d66 0%, #1e5288 100%);
    box-shadow: 0 6px 16px rgba(30, 82, 136, 0.4);
    transform: translateY(-1px);
}

.btn-login-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(30, 82, 136, 0.25);
}

.login-footer {
    margin-top: 26px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.login-footer p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

@media (max-width: 480px) {
    body.login-body {
        padding: 16px;
    }

    .login-card {
        padding: 28px 20px 22px;
        border-radius: 14px;
    }

    .login-logo {
        max-width: 160px;
    }

    .login-title {
        font-size: 20px;
    }
}
