/* ============================================================
   Trang đăng nhập HIS (nhân viên) - giao diện độc lập.
   Không phụ thuộc theme nội bộ (web-2.0.css) hay thư viện icon ngoài.
   ============================================================ */

:root {
    --lg-primary: #2563eb;
    --lg-primary-dark: #1d4ed8;
    --lg-primary-light: #eaf0fe;
    --lg-accent: #06b6d4;
    --lg-danger: #e5484d;
    --lg-danger-bg: #fdecec;
    --lg-text: #101828;
    --lg-muted: #667085;
    --lg-border: #e4e7ec;
    --lg-bg: #f7f9fc;
    --lg-card-bg: #ffffff;
    --lg-shadow: 0 10px 34px rgba(16, 24, 40, 0.08);
    --lg-radius: 16px;
}

* { box-sizing: border-box; }

html, body.lg-body {
    margin: 0;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--lg-text);
    background: var(--lg-bg);
}

.lg-wrap {
    min-height: 100vh;
    display: flex;
}

/* --- Left brand panel --- */
.lg-brand-panel {
    position: relative;
    flex: 1 1 46%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background: linear-gradient(155deg, #1d4ed8 0%, #2563eb 46%, #06b6d4 130%);
    overflow: hidden;
}

.lg-brand-panel::before,
.lg-brand-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.lg-brand-panel::before {
    width: 420px;
    height: 420px;
    top: -140px;
    right: -140px;
}

.lg-brand-panel::after {
    width: 300px;
    height: 300px;
    bottom: -110px;
    left: -80px;
    background: rgba(255, 255, 255, 0.06);
}

.lg-brand-top, .lg-brand-mid, .lg-brand-bottom {
    position: relative;
    z-index: 1;
}

.lg-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .2px;
}

.lg-brand-logo .lg-logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lg-brand-logo .lg-logo-badge svg { width: 22px; height: 22px; }

/* Logo that (anh) thay cho icon svg placeholder - anh da co nen trang rieng nen bo
   background/border-radius cua badge, chi giu kich thuoc khung. */
.lg-brand-logo .lg-logo-badge.lg-logo-img { background: transparent; }
.lg-logo-img { object-fit: contain; }

.lg-brand-mid h1 {
    font-size: 32px;
    line-height: 1.28;
    font-weight: 700;
    margin: 0 0 14px;
    max-width: 420px;
}

.lg-brand-mid p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
    max-width: 400px;
    margin: 0 0 26px;
}

.lg-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lg-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

.lg-feature-list svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.lg-brand-bottom {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.65);
}

/* --- Right form panel --- */
.lg-form-panel {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--lg-card-bg);
}

.lg-form-card {
    width: 100%;
    max-width: 380px;
}

.lg-form-head {
    margin-bottom: 28px;
}

.lg-form-head h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--lg-text);
}

.lg-form-head p {
    font-size: 14px;
    color: var(--lg-muted);
    margin: 0;
}

.lg-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: var(--lg-primary);
    margin-bottom: 28px;
}

.lg-mobile-brand .lg-logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--lg-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lg-mobile-brand .lg-logo-badge svg { width: 19px; height: 19px; color: var(--lg-primary); }
.lg-mobile-brand .lg-logo-badge.lg-logo-img { background: transparent; }

.lg-field { margin-bottom: 18px; }

.lg-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--lg-text);
    margin-bottom: 7px;
}

.lg-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.lg-input-icon {
    position: absolute;
    left: 14px;
    color: var(--lg-muted);
    display: flex;
    pointer-events: none;
}

.lg-input-icon svg { width: 18px; height: 18px; }

.lg-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 14.5px;
    border: 1.5px solid var(--lg-border);
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--lg-text);
    transition: border-color .15s, box-shadow .15s, background .15s;
    font-family: inherit;
}

.lg-input-group .lg-input.lg-has-suffix { padding-right: 44px; }

.lg-input:focus {
    outline: none;
    border-color: var(--lg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    background: #fff;
}

.lg-eye-btn {
    position: absolute;
    right: 4px;
    width: 38px;
    height: calc(100% - 8px);
    border: none;
    background: transparent;
    color: var(--lg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
}

.lg-eye-btn:hover { background: var(--lg-primary-light); color: var(--lg-primary); }
.lg-eye-btn svg { width: 18px; height: 18px; }
.lg-eye-btn .lg-eye-off { display: none; }
.lg-eye-btn.is-visible .lg-eye-open { display: none; }
.lg-eye-btn.is-visible .lg-eye-off { display: block; }

.lg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .05s, box-shadow .15s;
    font-family: inherit;
    margin-top: 6px;
}

.lg-btn:active { transform: scale(0.98); }

.lg-btn-primary {
    background: var(--lg-primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}
.lg-btn-primary:hover { background: var(--lg-primary-dark); }

.lg-btn[disabled] {
    opacity: .72;
    cursor: default;
}

.lg-spinner {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: lg-spin .7s linear infinite;
    display: none;
}

@keyframes lg-spin {
    to { transform: rotate(360deg); }
}

.lg-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.lg-alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.lg-alert-danger { background: var(--lg-danger-bg); color: var(--lg-danger); }

.lg-form-foot {
    text-align: center;
    font-size: 12.5px;
    color: var(--lg-muted);
    margin-top: 26px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .lg-brand-panel { display: none; }
    .lg-form-panel { flex: 1 1 100%; }
    .lg-mobile-brand { display: inline-flex; }
}

@media (max-width: 420px) {
    .lg-form-panel { padding: 24px 18px; }
}
