:root {
    --bg: #e9edf4;
    --card-bg: #ffffff;
    --text: #2b2f38;
    --muted: #6b7280;
    --border: #c5d1e6;
    --field-bg: #eaf1ff;
    --primary: #25118d;
    --primary-hover: #1b0c70;
    --danger: #cc3232;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: "Khmer OS Siemreap", "Khmer OS Battambang", Arial, sans-serif;
    color: var(--text);
}

[ng-cloak] {
    display: none !important;
}

html:not(.ng-scope) [data-js-validation] {
    display: none;
}

html.login-fallback-ready [data-js-validation].is-visible {
    display: block;
}

p[ng-bind]:empty {
    display: none;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.container {
    width: 100%;
    max-width: 382px;
    margin: 0 auto;
}

.py-5 {
    padding: 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.justify-content-center {
    justify-content: center;
}

.col-12,
.col-md-6,
.col-lg-5 {
    width: 100%;
    padding: 0;
}

.header-bg {
    width: 196px;
    height: 196px;
    margin: 0 auto 16px;
    background-image: var(--login-logo-image, url("../images/usea.png"));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.card {
    background: var(--card-bg);
    border: 1px solid #d9dee8;
    border-radius: 3px;
}

.shadow-lg {
    box-shadow: 0 2px 8px rgba(28, 35, 53, 0.18);
}

.login-card,
.login-card .form-control,
.login-card .btn {
    border-radius: 3px;
}

.login-body {
    padding: 16px 22px 18px;
}

.mb-3 {
    margin-bottom: 9px;
}

.mb-2 {
    margin-bottom: 8px;
}

.form-label {
    display: inline-block;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: #32343a;
}

.form-control {
    width: 100%;
    height: 38px;
    font-family: inherit;
    border: 1px solid var(--border);
    background: var(--field-bg);
    color: #111827;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 36px 8px 11px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: #111827;
    opacity: 1;
}

.form-control:focus {
    outline: none;
    border-color: #6d82bd;
    box-shadow: 0 0 0 3px rgba(37, 17, 141, 0.12);
}

.input-icon {
    position: relative;
}

.input-icon-btn {
    position: absolute;
    top: 50%;
    right: 11px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #747474;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.input-icon-btn svg {
    width: 14px;
    height: 14px;
}

.input-icon-btn:focus {
    outline: none;
}

.login-mode-row .form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.login-mode-row .select-caret {
    pointer-events: none;
}

.login-mode-row .select-caret svg {
    width: 15px;
    height: 15px;
}

.btn {
    display: inline-block;
    min-height: 40px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary-login {
    margin-top: 2px;
    background-color: var(--primary);
    color: #fff;
}

.btn-primary-login:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

.w-100 {
    width: 100%;
}

.btn-lg {
    font-size: 14px;
}

.invalid-feedback {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

.d-block {
    display: block;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 12px;
}

.text-muted {
    color: var(--muted);
}

.mb-0 {
    margin-bottom: 0;
}

@media (max-width: 575px) {
    .login-page {
        padding-top: 34px;
    }

    .header-bg {
        width: 154px;
        height: 154px;
        margin-bottom: 16px;
    }

    .login-body {
        padding: 18px 16px 20px;
    }

    .form-label,
    .btn,
    .btn-lg {
        font-size: 14px;
    }

    .form-control {
        height: 40px;
        font-size: 13px;
    }
}
