/* CMS Hide FE — overlay kính mờ + modal nhập mật khẩu */

html.cmshfe-locked,
html.cmshfe-locked body {
    overflow: hidden !important;
    height: 100% !important;
}

.cmshfe-overlay {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2147483600 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0 !important;
    background: linear-gradient(135deg, rgba(18, 24, 43, 0.55), rgba(8, 12, 24, 0.65));
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    animation: cmshfe-fade-in 0.25s ease-out;
}

/* Trình duyệt không hỗ trợ backdrop-filter: che đặc để nội dung không lộ ra */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .cmshfe-overlay {
        background: rgba(12, 17, 30, 0.97);
    }
}

@keyframes cmshfe-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cmshfe-modal {
    box-sizing: border-box;
    width: 100%;
    max-width: 400px;
    padding: 34px 30px 30px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.13);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    backdrop-filter: blur(26px) saturate(160%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    text-align: center;
    color: #fff;
    animation: cmshfe-pop-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

@keyframes cmshfe-pop-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.cmshfe-modal.cmshfe-shake {
    animation: cmshfe-shake 0.4s ease;
}

@keyframes cmshfe-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-9px); }
    40%      { transform: translateX(9px); }
    60%      { transform: translateX(-5px); }
    80%      { transform: translateX(5px); }
}

.cmshfe-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.cmshfe-title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 21px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.cmshfe-message {
    margin: 0 0 22px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.82) !important;
}

.cmshfe-form {
    margin: 0;
    padding: 0;
}

.cmshfe-field {
    position: relative;
    margin-bottom: 12px;
}

.cmshfe-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 46px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    font-size: 15px;
    line-height: 48px;
    outline: none;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cmshfe-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.cmshfe-input:focus {
    border-color: rgba(255, 255, 255, 0.75) !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

.cmshfe-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    box-shadow: none;
}

.cmshfe-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.cmshfe-submit {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #16203a !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, background 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
}

.cmshfe-submit:hover {
    background: #fff !important;
    transform: translateY(-1px);
}

.cmshfe-submit[disabled] {
    opacity: 0.65;
    cursor: default;
    transform: none;
}

.cmshfe-error {
    display: none;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #ffd3d3 !important;
}

.cmshfe-error.is-visible {
    display: block;
}

@media (max-width: 480px) {
    .cmshfe-modal {
        padding: 28px 20px 24px;
        border-radius: 18px;
    }

    .cmshfe-title {
        font-size: 19px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cmshfe-overlay,
    .cmshfe-modal,
    .cmshfe-modal.cmshfe-shake {
        animation: none !important;
    }
}
