/* Background elements */
.natuh-auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.logo-icon img {
    height: 60px;
}

.natuh-auth-bg .bg-img-container {
    position: relative;
    width: 100%;
    height: 55%;
}

.natuh-auth-bg .bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 80%;
}

.natuh-auth-bg .bg-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(247, 243, 232, 0) 0%, rgba(247, 243, 232, 1) 100%);
}

.natuh-auth-bg .leaf-top-left {
    position: absolute;
    top: -20px;
    left: -40px;
    width: 150px;
    transform: rotate(135deg);
    opacity: 0.8;
    filter: brightness(0.4) sepia(1) hue-rotate(90deg);
}

.natuh-auth-bg .leaf-mid-right {
    position: absolute;
    top: 45%;
    right: -30px;
    width: 120px;
    transform: rotate(-45deg);
    opacity: 0.8;
    filter: brightness(0.4) sepia(1) hue-rotate(90deg);
}

.natuh-auth-bg .bottom-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 1;
}

.natuh-auth-bg .bottom-waves svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Main Content Container */
.natuh-auth-content {
    width: 100%;
    /* max-width: 480px; */
    height: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 3vh 24px 2vh;
    margin: 0 auto;
}

.natuh-logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2vh;
    margin-bottom: 2vh;
}

.logo-icon {
    margin-bottom: 5px;
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    color: #0d3121;
    text-transform: uppercase;
}

.logo-slogan {
    font-size: 10px;
    font-weight: 600;
    color: #c39d65;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.natuh-title {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 3vh;
    color: #0d3121;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* Form Styles */
.natuh-form {
    width: 100%;
}

.natuh-form .form-group {
    position: relative;
    margin-bottom: 16px;
}

.natuh-form .form-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
    z-index: 2;
}

.natuh-form .eye-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
}

.natuh-form .form-control {
    width: 100%;
    padding: 16px 50px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    font-family: inherit;
}

.natuh-form .form-control:focus {
    border-color: #0d3121;
    box-shadow: 0 2px 12px rgba(13, 49, 33, 0.1);
}

/* Form Actions */
.natuh-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2vh;
    margin-top: 1vh;
    padding: 0 4px;
}

.remember-me {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
    color: #0d3121;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.remember-me .checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(13, 49, 33, 0.5);
    transition: all 0.2s ease;
}

.remember-me input:checked~.checkmark {
    background-color: #0d3121;
    border-color: #0d3121;
}

.remember-me .checkmark svg {
    color: white;
    width: 14px;
    height: 14px;
    display: none;
}

.remember-me input:checked~.checkmark svg {
    display: block;
}

.forgot-pwd {
    font-size: 14px;
    font-weight: 500;
    color: #0d3121;
    text-decoration: none;
}

/* Login Button */
.natuh-btn {
    width: 100%;
    background-color: #0d3121;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(13, 49, 33, 0.2);
    font-family: inherit;
}

.natuh-btn:hover {
    background-color: #092217;
}

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

/* Divider */
.natuh-divider {
    text-align: center;
    margin: 2vh 0 2vh;
    position: relative;
}

.natuh-divider::before {
    content: "";
    position: absolute;
    left: 10%;
    top: 50%;
    width: 80%;
    height: 1px;
    background-color: rgba(13, 49, 33, 0.2);
    z-index: 1;
}

.natuh-divider span {
    padding: 0 15px;
    color: #0d3121;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Social Buttons */
.natuh-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.natuh-socials .social-btn {
    width: 85px;
    height: 48px;
    border-radius: 25px;
    background-color: #ffffff;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    color: #000;
}

.natuh-socials .social-btn svg {
    width: 24px;
    height: 24px;
}

.natuh-socials .social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.natuh-auth:before {
    background: url(../../images/anh_nen_natuh.png);
    height: 100%;
    width: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    content: "";
    position: absolute;
}


/* Footer */
.natuh-footer {
    text-align: center;
    font-size: 14px;
    color: #0d3121;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 4vh;
    z-index: 3;
    position: relative;
}

.natuh-footer a {
    color: #0d3121;
    font-weight: 700;
    text-decoration: none;
}

/* Register Specific Styles */
.natuh-auth--scrollable {
    overflow-y: auto;
    align-items: flex-start;
    position: relative;
}

.natuh-auth-content--register {
    height: auto;
    padding-bottom: 4vh;
    padding-top: 4vh;

    /* Make it pop as a solid white card instead of blurry glass */
    background-color: #ffffff;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    margin-top: 8vh;
    /* Leave some sunset visible at the top */

    /* Native App Feel Properties */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.natuh-auth-header {
    width: 100%;
    margin-bottom: 15px;
    margin-top: 5px;
    /* Adjust since we added padding-top to container */
}

.natuh-auth-header .back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0d3121;
    text-decoration: none;
    transition: transform 0.2s;
}

.natuh-auth-header .back-btn:hover {
    transform: translateX(-3px);
}

.natuh-auth-titles {
    text-align: center;
    margin-bottom: 30px;
}

.natuh-auth-titles .main-title {
    font-size: 26px;
    font-weight: 700;
    color: #0d3121;
    margin-bottom: 8px;
}

.natuh-auth-titles .sub-title {
    font-size: 14px;
    color: #4a6358;
    line-height: 1.5;
}

.avatar-upload-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
    cursor: pointer;
}

.avatar-preview {
    position: relative;
    width: 70px;
    height: 70px;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #e8edea;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #8a9992;
}

.avatar-circle svg {
    width: 32px;
    height: 32px;
}

.camera-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: #0d3121;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #f7f3e8;
}

.avatar-text {
    display: flex;
    flex-direction: column;
}

.avatar-text .primary {
    font-weight: 700;
    font-size: 14px;
    color: #0d3121;
}

.avatar-text .secondary {
    font-size: 13px;
    color: #6a7d74;
}

.form-group-vertical {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-vertical label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0d3121;
}

.form-group-vertical label svg {
    color: #4a6358;
}

.form-group-vertical .form-control {
    padding: 16px 20px;
    /* Adjusted padding */
    background-color: #f7f9f8;
    /* Very soft airy background */
    border: 1px solid transparent;
    /* No harsh borders */
    border-radius: 20px;
    /* More rounded, app-like */
}

.form-group-vertical .form-control::placeholder {
    color: #aebdb5;
}

.form-group-vertical .form-control:focus {
    background-color: #ffffff;
    border-color: #0d3121;
    box-shadow: 0 4px 15px rgba(13, 49, 33, 0.08);
}

.form-group-vertical .input-with-icon {
    position: relative;
    width: 100%;
}

.form-group-vertical .input-with-icon .form-control {
    padding-right: 50px;
}

.register-actions {
    margin-top: 20px;
    margin-bottom: 30px;
}

.terms-checkbox {
    align-items: flex-start;
}

.terms-checkbox .checkmark {
    top: -1px;
    transform: none;
}

.terms-checkbox .terms-text {
    font-size: 13px;
    line-height: 1.4;
    color: #4a6358;
}

.terms-checkbox .terms-text b {
    color: #0d3121;
}

.register-footer {
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Forgot Password Styles */
.natuh-auth-content--forgot {
    padding-top: 3vh;
}

.auth-header--flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.auth-header--flex .header-title {
    font-size: 16px;
    font-weight: 700;
    color: #0d3121;
    margin: 0;
}

.spacer-24 {
    width: 24px;
}

/* Stepper */
.auth-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 30px;
    margin-top: 20px;
    padding: 0 10px;
}

.auth-stepper .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.auth-stepper .step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    color: #999;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    z-index: 2;
}

.auth-stepper .step.active .step-circle,
.auth-stepper .step.completed .step-circle {
    background-color: #0d3121;
    border-color: #0d3121;
    color: #ffffff;
}

.auth-stepper .step-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.auth-stepper .step.active .step-text,
.auth-stepper .step.completed .step-text {
    color: #0d3121;
    font-weight: 700;
}

.auth-stepper .step-line {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    margin-top: 16px;
    /* align with center of circle */
    transition: background-color 0.3s ease;
}

.auth-stepper .step-line.active {
    background-color: #0d3121;
}

/* Illustration */
.auth-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Specific Inputs */
.input-with-icon-left .icon-left {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8fa098;
    z-index: 2;
}

.form-control--icon-left {
    padding-left: 50px !important;
}

.back-to-login {
    color: #0d3121;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

/* Info Box */
.auth-info-box {
    display: flex;
    align-items: flex-start;
    background-color: #f7f9f8;
    padding: 16px;
    border-radius: 12px;
    gap: 12px;
    margin-top: auto;
    /* Push to bottom if space available */
    margin-bottom: 10px;
}

.auth-info-box .info-icon {
    color: #0d3121;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-info-box p {
    margin: 0;
    font-size: 13px;
    color: #4a6358;
    line-height: 1.5;
}

/* Full Screen Card (No Margin Top) */
.natuh-auth-content--full {
    background-color: #ffffff;
    height: 100vh;
    padding-top: 5vh;
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: #8fa098;
    cursor: pointer;
    position: relative;
}

.auth-tab.active {
    color: #0d3121;
    font-weight: 600;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background-color: #0d3121;
    border-radius: 2px;
}

/* Phone Input */
.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.phone-input-wrapper .phone-icon {
    margin-left: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.phone-input-wrapper .country-code {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    gap: 4px;
    padding-right: 10px;
    cursor: pointer;
}

.phone-input-wrapper .vertical-divider {
    width: 1px;
    height: 24px;
    background-color: #e0e0e0;
    margin-right: 10px;
}

.phone-input-wrapper .phone-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 10px 12px 0;
    font-size: 15px;
    color: #333;
    outline: none;
    border-radius: 0;
    box-shadow: none;
}

.phone-input-wrapper:focus-within {
    border-color: #0d3121;
    box-shadow: 0 2px 12px rgba(13, 49, 33, 0.1);
}

/* OTP Inputs */
.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 5px;
}

.otp-input {
    width: 48px;
    height: 52px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: #333;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.auth-alert.auth-alert--info {
    margin-bottom: 15px;
}

.otp-input:focus,
.otp-input.filled {
    border-color: #0d3121;
    box-shadow: 0 4px 12px rgba(13, 49, 33, 0.08);
    color: #0d3121;
}

/* ====== TABLET & DESKTOP STYLES ====== */
@media (min-width: 768px) {
    .natuh-auth {
        display: flex;
        justify-content: center;
        align-items: center;
        /* Center vertically on large screens */
        min-height: 100vh;
        position: relative;
        background-color: #f5f5f5;
        /* Fallback */
    }

    .natuh-auth-content {
        padding: 40px;
        height: 100vh;
        margin: 4vh auto;
        /* Vertical margin to avoid touching edges */
    }

    .natuh-auth-content--register {
        border-radius: 24px;
        /* full rounded corners on large screens */
        margin-top: 4vh;
        margin-bottom: 0px;
    }

    .natuh-auth-content--full {
        height: auto;
        border-radius: 24px;
        margin: 4vh auto;
    }
}

/* ====== SMALL MOBILE (Max 380px) ====== */
@media (max-width: 380px) {

    /* Form Actions: Stack remember me and forgot password */
    .natuh-form-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .forgot-pwd {
        align-self: flex-start;
        padding-left: 28px;
        /* align with checkbox text */
    }

    /* Social Buttons: Prevent overflow */
    .natuh-socials {
        gap: 10px;
    }

    .natuh-socials .social-btn {
        flex: 1;
        min-width: 0;
    }

    /* OTP Inputs: Prevent overflow on 320px screens */
    .otp-container {
        gap: 6px;
        padding: 0;
    }

    .otp-input {
        width: 100%;
        min-width: 0;
        height: 45px;
        font-size: 20px;
    }

    /* Padding adjustments */
    .natuh-auth-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.chat-bottom-nav {
    display: none;
}

/* --- NEW UI OVERRIDE --- */
.auth-wrapper {
    min-height: 100vh;
    background-color: #a97a31;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    top: 50px;
    right: -100px;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-header-text {
    padding: 50px 20px 30px;
    color: white;
    position: relative;
    z-index: 2;
}

.auth-header-text h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-align: center;
}

.auth-header-text h1 span {
    color: #a4e5e5;
}

.auth-card {
    background-color: white;
    border-top-left-radius: 35px;
    border-top-right-radius: 35px;
    flex: 1;
    padding: 30px 25px 40px;
    position: relative;
    z-index: 3;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    color: #133723;
    text-align: center;
    margin: 10px 0 5px;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

.auth-subtitle a {
    color: #a97a31;
    font-weight: 600;
    text-decoration: none;
}

.auth-form {
    width: 100%;
}

.auth-input-group {
    position: relative;
    margin-bottom: 15px;
}

.auth-input {
    width: 100%;
    background-color: #f7f7f7;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 16px 45px;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: all 0.3s;
}

.auth-input:focus {
    border-color: #a97a31;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(41, 181, 182, 0.1);
}

.auth-input::placeholder {
    color: #aaa;
}

.auth-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    display: flex;
    align-items: center;
}

.auth-icon-right {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    padding-left: 25px;
}

.auth-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.auth-checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: white;
}

.auth-checkbox input:checked~.auth-checkmark {
    background-color: #a97a31;
    border-color: #a97a31;
}

.auth-checkbox input:checked~.auth-checkmark:after {
    content: '';
    position: absolute;
    display: block;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-forgot {
    color: #a97a31;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.auth-btn {
    width: 100%;
    background-color: #a97a31;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: #143724;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 15px 0 25px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: #eee;
    z-index: 1;
}

.auth-divider span {
    background-color: white;
    padding: 0 15px;
    color: #999;
    font-size: 13px;
    position: relative;
    z-index: 2;
}

.auth-socials {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.auth-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.apple-btn {
    background-color: #111;
    color: white;
}

.google-btn {
    background-color: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.auth-social-btn:hover {
    transform: translateY(-2px);
}

.auth-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    margin-left: 15px;
}