body {
    font-family: Arial, sans-serif;
    /* background-color: #f5f5f5; */
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

.sign-in-container {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 12px 40px 36px;
}

.sign-in-header {
    text-align: center;
    margin-bottom: 24px;
}

.sign-in-header .title-modal {
    font-size: 22px;
    /* color: #1e88ae; */
    font-weight: 600;
    /* text-transform: uppercase; */
    margin-top: 8px;
}

.sign-form-title {
    color: #000;
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
    margin-bottom: 8px;
    position: relative;
}

.logo img {
    height: 25px;
}

.desktop-sign-in-popup-container .logo {
    margin: auto;
    justify-content: center;
}

.preferential-policies {
    display: flex;
    align-items: center;
    /* background: #eaf6ff; */
    justify-content: space-around;
    width: 100%;
    margin-top: 24px;
    padding: 8px 10px;
}

.preferential-policy-item-divide {
    position: relative;
}

.preferential-policy-item-divide::after {
    background: linear-gradient(rgba(10, 136, 0, 0), #43bfe3, #43bfe7, hsla(0, 0%, 100%, 0));
    content: "";
    height: 32px;
    left: 50%;
    opacity: .4;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
}

.preferential-policy-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preferential-policy-item .preferential-policy-icon {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preferential-policy-item .preferential-policy-icon svg{
    width: 100%;
}

.preferential-policy-item .preferential-policy-icon svg path{
    color: #1e88ae;
}

.preferential-content {
    color: #1e88ae;
    text-align: left;
}

.preferential-content .preferential-title{
    font-size: 14px;
    font-weight: 600;
}

.preferential-content .preferential-sub-title{
    font-size: 12px;
}

.encrypted-txt {
    display: flex;
    font-size: 12px;
    margin-top: 6px;
    justify-content: center;
    gap: 4px;
    color: #2e9108;
}

.encrypted-txt svg {
    width: 13px;
    height: 13px;
}

.sign-in-header .close {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 24px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.sign-in-header .back {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 24px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.sign-in-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sign-in-body.step-in-by-email {
    justify-content: start;
}

.sign-in-body.sign-in-by-phone {
    justify-content: start;
}

.coupon-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: space-evenly;
}

.coupon-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
}

.coupon-card-item .icon {
    background-color: #97d0e177;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-card-item .icon svg {
    width: 40px;
    height: 40px;
}

.coupon-card-item-title {
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
}

.coupon-card-item-sub {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.sign-in-container input {
    width: 100%;
    padding: 12px;
    border: 1px solid #757575;
    border-radius: 4px;
    font-size: 16px;
}

.sign-in-container input:focus {
    border-color: #43bfe3;
    outline: none;
}

.sign-in-container input::placeholder {
    opacity: 0.6;
}

.password-input-wrapper:has(.password-toggle-icon) > .sign-in-input {
    padding-right: 38px;
}

.password-input-wrapper .error-message {
    position: absolute;
    top: -10px;
    right: 8px;
    background: #fff;
    padding: 2px 4px;
    margin: 0;
    text-align: right;
}

.sign-in-container .button {
    width: 100%;
    background-color: #43bfe3;
    color: white;
    padding: 12px;
    height: 44px;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: box-shadow 0.12s ease-out;
}
.sign-in-container .button:hover {
    opacity: .9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.sign-in-container .button .spinner{
    width: 18px;
    height: 18px;
    display: block;
    padding: 2px;
    position: absolute;
    border-radius: 50%;
    background: #fff;
    margin-left: -56px;
    left: 50%;
    border: none;
    --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: spin 1s infinite linear;
}

.sign-in-container .button.button-social {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #757575;
    background-color: #fff;
    color: #000000;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    justify-content: center;
    height: 44px;
    font-weight: 600;
}

.sign-form {
    display: flex;
}

.sign-in-with-phone {
    flex: 1;
    padding: 24px;
    background: #eaf6ffc7;
    border-radius: 12px;
}

.sign-in-with-current-account {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.sign-in-with-current-account .button{
    margin-bottom: 0;
}

.sign-in-body .sign-form .trouble-sign-in {
    text-align: center;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}

.sign-with-separator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 40px;
}
.sign-with-separator span{
    color: #555;
    font-size: 14px;
    line-height: 18px;
    margin: 8px 0;
    text-align: center;
}
.sign-with-separator-top,
.sign-with-separator-bottom {
    background-color: #e6e6e6;
    display: block;
    flex: 1;
    transform: scaleX(.5);
    width: 1px;
}

.sign-with-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    padding: 24px;
}

.sign-with-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #757575;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    justify-content: center;
    height: 44px;
    font-weight: 600;
    transition: box-shadow 0.12s ease-out;
}

.sign-with-item:hover {
    opacity: .9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.sign-with-item span {
    width: 219px;
}

.sign-with-item.password-step span {
    text-align: center;
}

.sign-with-item svg {
    width: 34px;
    height: 34px;
}

.sign-with-facebook svg path {
    color: #1877f2;
    border-color: #1877f2;
}

.sign-with-apple svg path {
    color: #000000;
    border-color: #000000;
}

.terms-of-service {
    font-size: 13px;
    color: #333;
    text-align: center;
    margin-top: 16px;
}

.terms-of-service a {
    color: #43bfe3;
}

.sign-in-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.sign-in-description {
    color: #666;
    font-size: 14px;
    margin-top: 7px;
    line-height: 1.3;
    text-align: center;
}

.sign-in-container .form-title {
    font-size: 16px;
    margin: 7px 0px 12px 0px;
}

.sign-in-body form {
    margin-top: 12px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 12px 0;
}

.otp-countdown {
    text-align: center;
    margin: 12px 0;
    font-size: 14px;
    color: #777;
}

.otp-inputs .otp {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* 1 ô nhập THẬT (ẩn) + 4 ô hiển thị GIẢ: cho tự-điền OTP chạy ổn định (iOS/keyboard) */
.otp-inputs.otp-single { position: relative; cursor: text; }
.otp-inputs .otp-real {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
}
.otp-inputs .otp-fake {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    -webkit-user-select: none;
    user-select: none;
}
.otp-inputs .otp-fake.otp-active { border-color: #43bfe3; }

.otp-resend {
    text-align: center;
    font-size: 14px;
    color: #43bfe3;
    cursor: pointer;
    width: fit-content;
    margin: 0 auto 16px;
}

.otp-resend:hover {
    color: var(--primary-dk, #1B7EA1);
}

.error-message {
    display: flex;
    color: #e74c3c;
    font-size: 12px;
    margin-bottom: 12px;
    padding-left: 4px;
    justify-content: center;
}

.input-error {
    border-color: #e74c3c !important;
}

.sign-in-input-wrapper {
    position: relative;
}

.sign-in-input{
    margin-bottom: 12px;
}

.sign-in-input-wrapper .error-message {
    position: absolute;
    top: -10px;
    right: 8px;
    background: linear-gradient(180deg, #eaf6ffc7,#fff,#fff);
    padding: 2px 4px;
    margin: 0;
    text-align: right;
}

.input-value{
    color: #43bfe3;
    font-weight: 700;
    word-break: break-word;
}

.last-login-wrapper {
    text-align: center;
    margin-bottom: 8px;
}

.last-login-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
}

.last-login-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #43bfe3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.last-login-username {
    font-size: 18px;
    font-weight: bold;
}

.last-login-identifier {
    font-size: 14px;
    color: #666;
}

.button-secondary {
    background-color: white;
    color: #43bfe3;
    border: 1px solid #43bfe3;
}

.account-actions {
    display: flex;
    justify-content: center;
}

.account-actions .divider {
    border-left: 1px solid #333;
    height: 16px;
    margin: 0 8px;
    opacity: .8;
}

.remove-account,
.forget-account {
    text-align: center;
    color: #333;
    font-size: 13px;
    cursor: pointer;
}

.sign-in-body.step-in-by-email .forget-account {
    margin: -8px 0 12px;
    text-align: right;
}

.remove-account:hover,
.forget-account:hover {
    opacity: .8;
}

/* .forget-account {
    text-align: center;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    margin-top: 14px;
} */

.mobile-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-loading-box {
    /* background: #fff;
    padding: 16px 22px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 25px rgba(0,0,0,.2); */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #ddd;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.loading-text {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

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

.mobile-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-confirm-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.confirm-message {
    font-size: 16px;
    color: #111;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.confirm-btn-cancel:hover {
    background: #e2e2e2;
}

.confirm-btn-confirm {
    background: #43bfe3;
    color: white;
}

.confirm-btn-confirm:hover {
    background: #0fa4d1;
}

/* Desktop Popup Overlay */
.desktop-sign-in-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    opacity: 0;
}

.desktop-sign-in-popup-overlay.sign-in-active {
    opacity: 1;
}

.desktop-sign-in-popup-container {
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.desktop-sign-in-popup-container .sign-in-container {
    position: relative;
    min-height: auto;
    background: #fff;
}

.desktop-sign-in-popup-container .close {
    cursor: pointer;
}

.next-step-container {
    width: auto !important;
    min-width: 483px;
}

.remember-sign-in-title{
    font-size: 15px;
    line-height: 18px;
    font-weight: 600;
    color: rgb(34, 34, 34);
    text-align: center;
}

.desktop-step-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
}

.desktop-step-loading .spinner {
    width: 40px;
    height: 40px;
    display: block;
    padding: 4px;
    border-radius: 50%;
    background: #43bfe3;
    border: none;
    --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Đảm bảo popup container có position relative */
.desktop-sign-in-popup-container {
    position: relative;
}

.sign-with-item svg {
    width: 28px !important;
    height: 28px !important;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 40%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle-icon:hover {
    color: #333;
}

.password-toggle-icon svg {
    display: block;
}

.edit-phone-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.edit-phone-icon {
    width: 14px;
    height: 14px;
    fill: #43bfe3;
    transition: fill 0.2s;
    transform: translateY(1px);
}

.edit-phone-wrapper:hover .edit-phone-icon {
    fill: #1e88ae;
}
