/**
 * NukeViet Content Management System
 * Cục Thống kê TP Hải Phòng - Giao diện Đăng nhập Quản trị Hiện đại (Executive Card)
 * @version 4.x (2026 Redesign)
 * @license GNU/GPL version 2 or any later version
 */

/* 1. Reset & Global Styles
 -----------------------------------------------------------------------------*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: #F1F5F9;
    color: #1E293B;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
a:hover,
a:focus,
a:active {
    text-decoration: none !important;
}

/* 2. Full-height Flexbox Centering Wrapper
 -----------------------------------------------------------------------------*/
.hp-admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-color: #F1F5F9;
    box-sizing: border-box;
}

/* 3. Executive Login Card
 -----------------------------------------------------------------------------*/
.hp-login-card {
    width: 100%;
    max-width: 440px;
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #CBD5E1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s ease-in-out;
}

/* 4. Card Header & Branding
 -----------------------------------------------------------------------------*/
.hp-login-card-header {
    padding: 20px 24px 12px;
    text-align: center;
    background: #FFFFFF;
}

.hp-login-logo-link {
    display: inline-block;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.hp-login-logo-link:hover {
    transform: scale(1.03);
}

.hp-login-emblem {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto;
    object-fit: contain;
}

.hp-login-brand-meta {
    margin-bottom: 8px;
}

.hp-login-agency {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #64748B;
    margin-bottom: 2px;
}

.hp-login-org-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--hp-blue-link, #005781);
    letter-spacing: 0.3px;
    line-height: 1.3;
    margin: 0 0 4px 0;
}

.hp-login-sub-badge {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.35;
}

.hp-login-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 10px 0 12px;
    border: none;
}

.hp-login-form-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: 0.4px;
    margin: 0;
}

/* 5. Card Body & Form Elements
 -----------------------------------------------------------------------------*/
.hp-login-card-body,
#login-content {
    background: #FFFFFF;
    box-shadow: none;
    border-radius: 0;
    padding: 6px 24px 18px;
    margin: 0;
}

.hp-login-card-body .form-group {
    margin-bottom: 12px;
}

.hp-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 5px;
}

.hp-form-label .text-danger {
    color: #DC2626;
    margin-left: 2px;
}

/* Language selector */
.hp-lang-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.hp-form-label-inline {
    font-size: 12px;
    color: #64748B;
    margin: 0;
    font-weight: 500;
}

.hp-select-lang {
    width: auto !important;
    display: inline-block;
    height: 28px;
    font-size: 12px;
    padding: 2px 8px;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    color: #334155;
    background-color: #FFFFFF;
}

.hp-select-lang:focus {
    border-color: var(--hp-blue-primary, #0079B6);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--hp-blue-highlight-rgb, 0, 145, 216), 0.15);
}

/* Input Groups */
.hp-input-group {
    display: flex;
    position: relative;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    width: 100%;
}

.hp-input-group:focus-within {
    border-color: var(--hp-blue-primary, #0079B6);
    box-shadow: 0 0 0 3px rgba(var(--hp-blue-highlight-rgb, 0, 145, 216), 0.15);
}

.hp-input-group .input-group-addon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8FAFC;
    border: none;
    border-right: 1px solid #CBD5E1;
    color: #64748B;
    min-width: 40px;
    padding: 0 10px;
    font-size: 14px;
}

.hp-input-group .form-control {
    flex: 1 1 auto;
    width: 100%;
    height: 40px;
    padding: 6px 12px;
    font-size: 14px;
    color: #1E293B;
    background-color: #FFFFFF;
    border: none;
    box-shadow: none;
    outline: none;
    border-radius: 0;
}

.hp-input-group .form-control:focus {
    box-shadow: none;
    outline: none;
}

.hp-input-group .form-control::placeholder {
    color: #94A3B8;
    font-size: 13px;
}

/* Password Toggle */
.hp-input-group .hp-toggle-pw {
    cursor: pointer;
    border: none;
    border-left: 1px solid #CBD5E1;
    background-color: #F8FAFC;
    color: #64748B;
    transition: color 0.15s ease, background-color 0.15s ease;
    user-select: none;
}

.hp-input-group .hp-toggle-pw:hover,
.hp-input-group .hp-toggle-pw:focus {
    color: var(--hp-blue-link, #005781);
    background-color: #EEF2F6;
}

/* 6. Captcha Row
 -----------------------------------------------------------------------------*/
.hp-captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hp-captcha-display {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hp-captcha-display img#vimg {
    height: 40px;
    border-radius: 6px;
    border: 1px solid #CBD5E1;
    cursor: pointer;
    display: block;
    background-color: #FFFFFF;
}

.hp-btn-captcha-refresh {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.hp-btn-captcha-refresh:hover,
.hp-btn-captcha-refresh:focus {
    color: var(--hp-blue-link, #005781);
    background: #EEF2F6;
    border-color: #94A3B8;
}

.hp-captcha-input-wrap {
    flex: 1 1 auto;
}

.hp-captcha-input-wrap .form-control {
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 7. Submit Button & Actions
 -----------------------------------------------------------------------------*/
.hp-actions-row {
    margin-top: 16px;
    margin-bottom: 8px;
}

.hp-btn-submit {
    height: 42px;
    background-color: var(--hp-blue-primary, #0079B6) !important;
    border: 1px solid var(--hp-blue-primary, #0079B6) !important;
    color: #FFFFFF !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-btn-submit:hover,
.hp-btn-submit:focus {
    background-color: var(--hp-blue-active, #00699D) !important;
    border-color: var(--hp-blue-active, #00699D) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(0, 56, 108, 0.25);
}

.hp-btn-submit:active {
    background-color: var(--hp-blue-active, #00699D) !important;
    border-color: var(--hp-blue-active, #00699D) !important;
    transform: translateY(1px);
}

.lostpass {
    margin: 8px 0 0 0;
    text-align: right;
}

.lostpass a {
    color: var(--hp-blue-link, #005781) !important;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 500;
    transition: color 0.15s ease;
}

.lostpass a:hover {
    color: var(--hp-blue-link, #005781) !important;
}

/* 8. Alerts & Feedback Messages
 -----------------------------------------------------------------------------*/
.inner-message {
    margin-bottom: 12px;
}

.inner-message .normal {
    background-color: #EFF6FF;
    color: var(--hp-blue-link, #005781);
    border: 1px solid #BFDBFE;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.4;
}

.inner-message .error,
.hp-login-alert,
.alert-danger {
    background-color: #FEF2F2 !important;
    color: #DC2626 !important;
    border: 1px solid #FECACA !important;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inner-message .error em,
.hp-login-alert em {
    font-size: 14px;
    flex-shrink: 0;
}

.inner-message .error.alert-warning,
.alert-warning {
    background-color: #FFFBEB !important;
    color: #92400E !important;
    border: 1px solid #FDE68A !important;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: block !important;
}

.inner-message .error.alert-warning strong,
.alert-warning strong {
    color: #B45309;
}

/* 9. 2-Step Verification & OAuth
 -----------------------------------------------------------------------------*/
.loginStep2 {
    padding-top: 4px;
}

.hp-2step-hello {
    font-size: 14px;
    color: #1E293B;
    margin-bottom: 16px;
}

.hp-link-logout {
    color: #64748B !important;
    font-size: 13px;
    font-style: normal;
    display: inline-block;
    margin-top: 12px;
}

.hp-link-logout:hover {
    color: var(--hp-blue-link, #005781) !important;
}

.login-2step-others {
    border-top: 1px solid #E2E8F0;
    padding-top: 12px;
    margin-top: 16px;
    font-size: 13px;
    color: #475569;
}

.btn-facebook {
    background-color: #4267b2;
    border-color: #4267b2;
    color: #fff;
    border-radius: 6px;
    height: 40px;
    font-weight: 500;
}

.btn-facebook:hover,
.btn-facebook:active,
.btn-facebook:focus {
    background-color: #365899 !important;
    border-color: #365899 !important;
    color: #fff !important;
}

.btn-google {
    background-color: #ea4335;
    border-color: #ea4335;
    color: #fff;
    border-radius: 6px;
    height: 40px;
    font-weight: 500;
}

.btn-google:hover,
.btn-google:active,
.btn-google:focus {
    background-color: #d33828 !important;
    border-color: #d33828 !important;
    color: #fff !important;
}

.btn-zalo {
    background-color: #0067ff;
    border-color: #0067ff;
    color: #fff;
    border-radius: 6px;
    height: 40px;
    font-weight: 500;
}

.btn-zalo:hover,
.btn-zalo:active,
.btn-zalo:focus {
    background-color: #035adb !important;
    border-color: #035adb !important;
    color: #fff !important;
}

.grecaptcha-badge {
    visibility: hidden;
}

/* 10. Card Footer & Support Meta
 -----------------------------------------------------------------------------*/
.hp-login-card-footer,
#copyright {
    background-color: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    padding: 12px 18px;
    text-align: center;
    font-style: normal;
    color: #64748B;
    margin: 0;
}

.hp-login-support-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 11.5px;
}

.hp-support-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748B;
}

.hp-support-item em {
    color: var(--hp-blue-link, #005781);
    font-size: 13px;
}

.hp-support-item strong {
    color: #1E293B;
    font-weight: 600;
}

.hp-login-copyright-text {
    font-size: 11px;
    color: #94A3B8;
    line-height: 1.4;
    margin: 0;
}

.hp-login-copyright-text p {
    margin: 0;
}

/* 11. Mobile Responsiveness
 -----------------------------------------------------------------------------*/
@media (max-width: 480px) {
    .hp-admin-login-wrapper {
        padding: 12px 10px;
    }

    .hp-login-card {
        border-radius: 8px;
    }

    .hp-login-card-header {
        padding: 20px 16px 14px;
    }

    .hp-login-emblem {
        width: 64px;
        height: 64px;
    }

    .hp-login-agency {
        font-size: 10px;
    }

    .hp-login-org-title {
        font-size: 14px;
    }

    .hp-login-sub-badge {
        font-size: 11px;
    }

    .hp-login-form-title {
        font-size: 14px;
    }

    .hp-login-card-body,
    #login-content {
        padding: 8px 16px 20px;
    }

    .hp-captcha-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .hp-captcha-display {
        justify-content: center;
    }

    .hp-login-card-footer,
    #copyright {
        padding: 14px 14px;
    }
}
