#pg-signup {
    max-width: 600px;

    #card-signup {
        width: 100%;
        min-width: 340px
    }

    button {
        width: 100%;
    }

    hr {
        height: 3px;
        background: #000;
        width: 80%;
    }

    input[type='date'],
    input[type='email'],
    input[type='password'],
    input[type='text'] {
        min-width: 292px;
    }

    input[type='radio'] {
        width: 24px;
        height: 24px;
    }

    input[type="radio"] {
        &:checked {
            &::after {
                width: 18px;
                height: 18px;
            }
        }
    }

    small {
        margin-top: -10px;
        font-size: small;

        &.red {
            color: red;
        }
    }

    .step-tracker-container {
        position: relative;
        width: 100%;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;

        #step-track-bg {
            position: absolute;
            width: 100%;
            height: 6px;
            border-radius: 20px;
            background: #0002;
            box-shadow: var(--in3d);
            transition: all 500ms ease-in-out;
            z-index: 1;

            #step-track-progress {
                width: 0%;
                height: 100%;
                border-radius: 20px;
                background: linear-gradient(var(--col2), var(--col3));
                box-shadow: var(--cardmed);
                transition: all 500ms ease-in-out;
            }
        }

        .step-nodes {
            position: absolute;
            width: 100%;
            display: flex;
            justify-content: space-between;
            z-index: 2;

            .step-node {
                width: 18px;
                height: 18px;
                border-radius: 50%;
                background: #ddd;
                box-shadow: var(--cardShadowMed);
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 11px;
                color: #fff;
                transition: all 500ms ease-in-out;

                /* Current Step State */
                &.active {
                    background: var(--btnbg);
                    scale: 1.1;
                    transition: all 500ms ease-in-out 600ms;
                }

                /* Completed Step State */
                &.completed {
                    background: var(--btnbg);
                }

                &.completed i {
                    display: block !important;
                }
            }
        }
    }

    #signup-form {
        width: 100%;
        max-width: 450px;
        display: flex;
        flex-direction: column;
        align-items: center;

        input:focus {
            background: transparent;
        }

        input::placeholder {
            color: var(--col4);
        }

        .form-heading {
            font-size: 18px;
            font-weight: 700;
            margin-top: 10px;
        }

        .step {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .step:has(textarea) {
            align-items: stretch;
        }

        .form-label {
            color: red;
        }

        #step-1,
        #step-3 {

            .gender-grid {
                width: 260px;
                margin-bottom: 10px;
                padding: 5px;
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }

            .gender-col {
                display: grid;
                gap: 10px;
            }

            .gender-col:first-child {
                justify-items: end;
            }
        }

        .radio-label {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .extended-container {
            width: 300px;
            display: grid;
            gap: 10px;
            margin-top: 15px;
        }

        .scroll-box {
            width: 100%;
            max-height: 300px;
            padding: 10px;
            border-radius: 8px;
            box-shadow: var(--in3d);
            display: grid;
            overflow-y: scroll;
        }

        .extended-radio-label {
            display: grid;
            grid-template-columns: 20px 1fr;
            gap: 5px 10px;
            align-items: center;
            cursor: pointer;
            text-align: left;
            width: 100%;
            margin-bottom: 12px;
        }

        .text-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 100%;
        }

        .identity-title {
            font-weight: 700;
            color: var(--col7);
        }

        .identity-desc {
            font-size: 13px;
            color: var(--col4);
        }

        .person-heading {
            margin-top: 20px;
            align-self: flex-start;
        }

        #person-1-container,
        #person-2-container {
            width: 100%;
            display: grid;
            gap: 10px;
            justify-items: center;
            margin-top: 15px;
        }

        .nav-container {
            margin-top: 20px;
        }
    }




    .tracker-nav-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: -10px;
        margin-bottom: 25px;
        min-height: 20px;
    }

    .nav-arrow-btn {
        background: transparent;
        border: none;
        color: var(--col4);
        font-weight: 700;
        cursor: pointer;
        font-size: 14px;
        padding: 5px 10px;
        letter-spacing: 0.5px;
        transition: color 200ms ease;
    }

    .nav-arrow-btn:hover {
        color: var(--col3);
    }

    /* STEP 1 */
    #step-1 {
        #refcode {
            max-width: calc(100vw - 60px);
            min-width: 292px;
            height: 50px;
            font-size: 16px;
            display: flex;
            align-items: center;
            overflow: hidden;
            overflow: hidden;
            text-overflow: ellipsis;
            justify-content: center;
        }

        .dob-container {
            width: 100%;
            display: flex;
            justify-content: center;

            .dob-split-row {
                display: grid;
                grid-template-columns: 60px 60px 80px;
                justify-items: center;
                gap: 10px;


                input {
                    height: 50px;
                    /* width: 100%; */
                    min-width: unset;
                    text-align: center;
                }

                input:not(:last-child)::after {
                    content: "/";
                    position: absolute;
                    left: -10px;
                }
            }
        }
    }

    .autocomplete-suggestions {
        position: absolute;
        left: 50%;
        max-width: 90%;
        max-height: 200px;
        border: solid 1px var(--col6);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
        transform: translateX(-50%);
        overflow-y: auto;
        z-index: 99;
    }

    .suggestion-item {
        padding: 12px;
        cursor: pointer;
        text-align: left;
        color: var(--col7);
    }

    .suggestion-item:hover {
        background-color: var(--col6);
    }

    /* STEP 2 */
    .slider-container {
        width: 100%;
    }

    #step-3 {
        width: 260px;
    }

    /* STEP 4 */
    #drop-zone {
        width: 100%;
        height: 200px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: dashed 2px var(--col4);
        border-radius: 8px;
        text-align: center;
        cursor: pointer;
        position: relative;
        overflow: hidden;

        i {
            font-size: 32px;
            color: var(--col4);
            margin-bottom: 10px;
        }

        p {
            margin: 0;
        }
    }

    #photo_preview {
        width: 100%;
        height: 100%;
        object-fit: contain;
        position: absolute;
        top: 0;
        left: 0;
        background: #0001;
    }

    /* STEP 5 */
    #crop-wrapper {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        overflow: hidden;
        user-select: none;
        touch-action: none;
        box-shadow: var(--shadow);
        border-radius: 8px;
        background: #000;
    }

    #crop-source-img {
        display: block;
        width: 100%;
        height: auto;
        pointer-events: none;
    }

    #crop-overlay-box {
        position: absolute;
        top: 0;
        left: 0;
        border: solid 2px var(--col3);
        box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.6);
        cursor: move;
        box-sizing: border-box;
    }

    #step-6 {
        textarea {
            width: 100%;
            min-width: 292px;
            resize: vertical;
            font-size: 14px;
        }

        textarea::placeholder {
            color: var(--col4);
            opacity: 1;
        }

        textarea:focus {
            background: transparent;
        }

        #bio {
            height: 200px;
        }

        #bio-counter {
            width: 100%;
            font-size: 12px;
            text-align: right;
        }
    }

    #step-7 {
        .inset:has(#password) {
            position: relative;
        }

        .checkbox-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 15px;

            label {
                cursor: pointer;
                margin: 0;
                user-select: none;
            }
        }

        .checkbox-row label {
            cursor: pointer;
            margin: 0;
            user-select: none;
        }

        #eye-btn {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            min-width: 32px;
            border: none;
            background-color: transparent;
            font-size: 24px;
            cursor: pointer;
        }

        #eye-btn::after {
            content: '\f06e';
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }

        #eye-btn.slash::after {
            content: '\f070';
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }



    }

    /* step 8 */
    #step-8 {
        .otp-container {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            max-width: 360px;
            margin: 15px auto;
        }

        .otp-field {
            min-width: unset;
            height: 50px;
            text-align: center;
            font-size: 24px;
            font-weight: 700;
            border-radius: 10px;
            box-shadow: var(--in3d);
            background: #0002;
        }

        .otp-field:focus {
            background: transparent;
            outline: solid 3px var(--col3);
            outline-offset: -2px;
        }
    }

    /* step 9 */
    #step-9 {
        .terms-column {
            display: flex;
            flex-direction: column;
            gap: 15px;
            width: 100%;
            margin-top: 10px;

            .checkbox-row {
                display: grid;
                grid-template-columns: 30px 1fr;
                align-items: center;
                justify-items: end;
                gap: 10px;
            }
        }

        .modal-trigger-link {
            color: var(--col3);
            cursor: pointer;
            font-weight: 700;
        }

        /* Fixed backdrop to cover the mobile viewport completely */
        .terms-overlay-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000e;
            z-index: 9999;
            padding: 20px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
        }

        /* Independent inner scrolling container for your tou.php text blocks */
        .terms-scroll-wrapper {
            width: 100%;
            display: flex;
            overflow-y: auto;
            background: #fff2;
            padding: 20px;
            margin-bottom: 20px;
            color: #fff;
            font-size: 15px;
            font-weight: 400;
            line-height: 1.6;
            justify-content: center;
        }

        /* Dismissal button format scaling across full width */
        .modal-close-btn {
            width: fit-content;
            padding: 10px;
            font-size: 16px;
        }

        /* Container framework for the toggle alignment row */
        .tou-toggle-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid #222;
        }

        /* Base switch checkbox container */
        .tou-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }

        /* Hide native checkbox box */
        .tou-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        /* Slide background styling track */
        .tou-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #333;
            transition: .3s;
            border-radius: 34px;
        }

        /* Rounded knob inner circle graphic element */
        .tou-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

        /* Shift knob location rightward when active */
        .tou-switch input:checked+.tou-slider:before {
            transform: translateX(24px);
        }

        #tou {
            max-width: 680px;
        }

        /* Text label default active contrast styles */
        .toggle-label {
            font-size: 14px;
            color: #666;
            font-weight: 700;
            transition: color 0.3s;
        }

        .toggle-label.active {
            color: #fff;
        }



    }
}

@media (min-width: 768px) {
    input[type="radio"] {
        width: 20px !important;
        height: 20px !important;

        &:checked {
            &::after {
                width: 14px !important;
                height: 14px !important;
            }
        }
    }

    .card {
        max-width: 600px;
    }

    #step-track-bg {
        height: 8px !important;
    }

    .step-node {
        width: 24px !important;
        height: 24px !important;
    }
}