/* ============================================
 * LOGIN.CSS - Styles riêng cho trang login/register
 * Bao gồm: header, tab, form, footer-nav,
 *          pwd-strength, modal, toast, kefu, err-msg
 * ============================================ */

/* ============ LOGIN WRAPPER ============ */
#wraplogin {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 0 0.6rem;
}
#app { width: 100%; max-width: 6.4rem; }
.Login { width: 100%; padding: 0; }
.LoginItem { width: 100%; }

/* ============ HEADER (LOGO + CLOSE) ============ */
.login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 0 0.6rem 0;
    margin-top: -0.20rem;
}
.login-logo-wrap {
    position: relative;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo-ring {
    position: absolute;
    inset: -0.1rem;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ff8a3d, #ff5b8d, #6c5ce7, #00b894, #ff8a3d);
    padding: 0.5rem;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: login-logo-spin 6s linear infinite;
}
.login-logo {
    width: 20rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0.08rem 0.22rem rgba(108, 92, 231, 0.3);
    position: relative;
    z-index: 1;
}
@keyframes login-logo-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============ TAB TITLE ============ */
.content-tab { margin-bottom: 0.6rem; }
.tab-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.36rem;
    font-weight: 600;
}
.tab-title > div { cursor: pointer; }
.tab-title > div span,
.tab-title > span {
    color: #999;
    font-weight: 500;
    transition: color 0.2s;
}
.tab-title > span.active,
.tab-title > div span.active {
    color: #2d3436;
    font-weight: 700;
}
.tab-transform {
    position: relative;
    height: 0.04rem;
    margin-top: 0.16rem;
    background: #f0f0f0;
}
.tab-transform p {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 1.4rem;
    background: linear-gradient(90deg, #FF4757, #FF6B6B);
    border-radius: 0.02rem;
    transition: left 0.25s, width 0.25s;
}

/* ============ INPUTS ============ */
.content-input { width: 100%; }
.LoginInput {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.28rem 0.24rem;
    background: #f8f8f8;
    border-radius: 0.12rem;
    margin-bottom: 0.24rem;
    border: 0.02rem solid transparent;
    transition: border-color 0.2s;
}
.LoginInput:focus-within {
    border-color: #FF4757;
    background: #fff;
}
.LoginInput > img {
    width: 0.36rem;
    height: 0.36rem;
    opacity: 0.5;
    flex-shrink: 0;
}
.LoginInput input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.3rem;
    color: #2d3436;
    height: 0.44rem;
    min-width: 0;
}
.LoginInput input::placeholder { color: #bbb; }
.LoginInput > div:last-child {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.LoginInput > div:last-child img {
    width: 0.32rem;
    height: 0.32rem;
    opacity: 0.6;
}

/* ============ CAPTCHA ============ */
.LoginInput.code-input > div:last-child .code img {
    width: 1.6rem;
    height: 0.56rem;
    border-radius: 0.08rem;
    cursor: pointer;
}

/* ============ SUBMIT BUTTON ============ */
.login_btn { margin-top: 0.5rem; margin-bottom: 0.3rem; }
.login_btn input {
    width: 100%;
    height: 0.88rem;
    background: linear-gradient(135deg, #FF6B6B, #FF4757);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.32rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0.08rem 0.2rem rgba(255,71,87,0.3);
}
.login_btn input:active { transform: scale(0.98); }
.login_btn input:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============ LANG LINK ============ */
.lang-link { text-align: center; margin: 0.24rem 0; font-size: 0.26rem; }
.lang-link a { color: #FF4757; margin: 0 0.1rem; }
.input-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.3rem;
    font-size: 0.28rem;
}
.input-link > div, .input-link > a { color: #FF4757; cursor: pointer; }

/* ============ FOOTER NAV ============ */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-top: 0.02rem solid #eee;
    box-shadow: 0 -0.08rem 0.4rem rgba(0,0,0,0.05);
    z-index: 100;
}
.footer-nav > div {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 0.16rem 0;
}
.footer-nav li {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.06rem;
}
.footer-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.06rem;
}
.footer-link img { width: 0.5rem; height: 0.5rem; }
.footer-link span { font-size: 0.22rem; color: #999; }
.footer-link.active span { color: #FF4757; }
.footer-nav > p { height: 0.36rem; background: #fff; }

/* ============ MODAL ============ */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-mask.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 0.2rem;
    padding: 0.5rem 0.6rem;
    max-width: 5rem;
    text-align: center;
    animation: pop 0.25s ease;
}
@keyframes pop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-icon {
    width: 0.9rem;
    height: 0.9rem;
    margin: 0 auto 0.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: #fff;
}
.modal-icon.success { background: linear-gradient(135deg, #2ED573, #26c965); }
.modal-icon.error { background: linear-gradient(135deg, #FF6B6B, #FF4757); }
.modal-title {
    font-size: 0.32rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 0.1rem;
}
.modal-msg { font-size: 0.26rem; color: #666; line-height: 1.4; margin-bottom: 0.3rem; }
.modal-btn {
    background: linear-gradient(135deg, #FF6B6B, #FF4757);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.18rem 0.6rem;
    font-size: 0.28rem;
    font-weight: 600;
    cursor: pointer;
}

/* ============ TOAST MODAL (không có nút OK, auto-redirect) ============ */
.toast-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}
.toast-mask.show {
    display: flex;
    animation: fadeIn 0.25s ease;
}
.toast-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.3rem;
    padding: 0.6rem 0.7rem;
    width: 5.6rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    animation: toastPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes toastPop {
    0%   { transform: scale(0.5); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.toast-icon {
    width: 0.9rem;
    height: 0.9rem;
    margin: 0 auto 0.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: #fff;
    background: linear-gradient(135deg, #2ED573, #26c965);
}
.toast-title {
    font-size: 0.34rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 0.12rem;
}
.toast-msg {
    font-size: 0.26rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0;
}

/* ============ PASSWORD STRENGTH ============ */
.pwd-strength {
    display: flex;
    gap: 0.06rem;
    margin: -0.1rem 0 0.2rem 0.1rem;
}
.pwd-strength span {
    flex: 1;
    height: 0.04rem;
    background: #eee;
    border-radius: 0.02rem;
}
.pwd-strength.s1 span:nth-child(1) { background: #FF4757; }
.pwd-strength.s2 span:nth-child(-n+2) { background: #FFA502; }
.pwd-strength.s3 span:nth-child(-n+3) { background: #2ED573; }
.pwd-strength.s4 span { background: #2ED573; }

/* ============ ERR MSG ============ */
.err-msg {
    color: #FF4757;
    font-size: 0.24rem;
    margin-top: -0.12rem;
    margin-bottom: 0.12rem;
    padding-left: 0.1rem;
    display: none;
}
.err-msg.show { display: block; }

/* ============ FLOAT KEFU - dùng chung từ assets/css/kefu.css ============ */
