/* =========================================================
   FARMNOVA AI — REGISTRATION COMPATIBILITY / SERVER FEEDBACK
   ========================================================= */


/* =========================================================
   ACTUAL PAGE LAYOUT
   ========================================================= */

.registration-page {
    width: 100%;
    min-height: 100vh;
    padding: 50px 20px 70px;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(22, 132, 71, 0.05),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(245, 158, 11, 0.045),
            transparent 25%
        ),
        var(--fn-background, #f6f9f7);

    color: var(--fn-text, #17221b);
}


.registration-container {
    width: 100%;
    max-width: 1280px;

    margin: 0 auto;

    display: grid;
    grid-template-columns:
        minmax(280px, 0.82fr)
        minmax(0, 1.35fr);

    gap: 34px;

    align-items: start;
}


/* =========================================================
   INTRODUCTION
   ========================================================= */

.registration-intro {
    position: sticky;
    top: 110px;

    padding: 35px 10px 20px;
}


.registration-intro__content {
    max-width: 500px;
}


.registration-eyebrow,
.registration-form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--fn-green, #168447);

    font-size: 0.75rem;
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.registration-eyebrow {
    margin-bottom: 17px;
}


.registration-intro h1 {
    margin: 0;

    color: var(--fn-text-dark, #101812);

    font-size: clamp(
        2.2rem,
        4vw,
        4rem
    );

    line-height: 1.05;

    letter-spacing: -0.04em;
}


.registration-intro h1 span {
    color: var(--fn-green, #168447);
}


.registration-intro__description {
    max-width: 480px;

    margin: 20px 0 28px;

    color: var(--fn-muted, #6d786f);

    font-size: 0.95rem;

    line-height: 1.8;
}


/* =========================================================
   BENEFITS
   ========================================================= */

.registration-benefits {
    display: grid;

    gap: 13px;

    margin-top: 28px;
}


.registration-benefit {
    display: flex;

    align-items: center;

    gap: 13px;

    padding: 13px 0;
}


.registration-benefit__icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--fn-green-soft, #eaf7ef);

    color: var(--fn-green, #168447);

    font-size: 1rem;
}


.registration-benefit strong {
    display: block;

    color: var(--fn-text-dark, #101812);

    font-size: 0.84rem;

    font-weight: 800;
}


.registration-benefit span {
    display: block;

    margin-top: 3px;

    color: var(--fn-muted, #6d786f);

    font-size: 0.73rem;

    line-height: 1.5;
}


/* =========================================================
   INTRO NOTE
   ========================================================= */

.registration-intro__note {
    display: flex;

    gap: 12px;

    margin-top: 30px;

    padding: 16px;

    border: 1px solid
        rgba(22, 132, 71, 0.10);

    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.72);
}


.registration-intro__note > i {
    color: var(--fn-green, #168447);

    margin-top: 2px;
}


.registration-intro__note strong {
    display: block;

    color: var(--fn-text-dark, #101812);

    font-size: 0.76rem;
}


.registration-intro__note p {
    margin: 4px 0 0;

    color: var(--fn-muted, #6d786f);

    font-size: 0.7rem;

    line-height: 1.6;
}


/* =========================================================
   FORM WRAPPER
   ========================================================= */

.registration-form-wrapper {
    width: 100%;

    padding: 32px;

    border: 1px solid
        var(--fn-border, #e1e8e3);

    border-radius: 24px;

    background: #ffffff;

    box-shadow:
        0 25px 70px
        rgba(20, 60, 35, 0.08);
}


.registration-form-header {
    margin-bottom: 28px;
}


.registration-form-header h2 {
    margin: 8px 0 8px;

    color: var(--fn-text-dark, #101812);

    font-size: clamp(
        1.6rem,
        2.6vw,
        2.25rem
    );

    line-height: 1.15;

    letter-spacing: -0.035em;
}


.registration-form-header p {
    margin: 0;

    color: var(--fn-muted, #6d786f);

    font-size: 0.82rem;

    line-height: 1.65;
}


/* =========================================================
   SERVER ERROR
   ========================================================= */

.registration-server-error {
    display: flex;

    align-items: flex-start;

    gap: 13px;

    margin-bottom: 24px;

    padding: 14px 15px;

    border: 1px solid
        rgba(220, 53, 69, 0.18);

    border-left: 4px solid
        var(--fn-danger, #dc3545);

    border-radius: 13px;

    background:
        var(--fn-danger-soft, #fff1f2);

    color: var(--fn-danger, #dc3545);
}


.registration-server-error__icon {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(
        220,
        53,
        69,
        0.10
    );

    font-size: 0.85rem;
}


.registration-server-error__content {
    flex: 1;

    min-width: 0;
}


.registration-server-error__content strong {
    display: block;

    margin-bottom: 3px;

    font-size: 0.77rem;

    font-weight: 800;
}


.registration-server-error__content span {
    display: block;

    color: #7f1d2d;

    font-size: 0.76rem;

    line-height: 1.55;

    word-break: break-word;
}


.registration-server-error__close {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: var(--fn-danger, #dc3545);

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.registration-server-error__close:hover {
    background:
        rgba(
            220,
            53,
            69,
            0.10
        );
}


/* =========================================================
   REGISTRATION SECTIONS
   ========================================================= */

.registration-section {
    margin-bottom: 32px;
}


.registration-section-heading {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin-bottom: 20px;
}


.registration-section-number {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--fn-green-soft, #eaf7ef);

    color: var(--fn-green, #168447);

    font-size: 0.7rem;

    font-weight: 800;
}


.registration-section-heading h3 {
    margin: 0;

    color: var(--fn-text-dark, #101812);

    font-size: 0.95rem;

    font-weight: 800;
}


.registration-section-heading p {
    margin: 4px 0 0;

    color: var(--fn-muted, #6d786f);

    font-size: 0.72rem;

    line-height: 1.55;
}


/* =========================================================
   ACCOUNT TYPES
   ========================================================= */

.account-type-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 12px;
}


.account-type-card {
    position: relative;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 15px;

    border: 1px solid
        var(--fn-border, #e1e8e3);

    border-radius: 15px;

    background: #ffffff;

    cursor: pointer;

    transition:
        border-color 0.22s ease,
        background 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;
}


.account-type-card:hover {
    border-color:
        rgba(22, 132, 71, 0.35);

    transform:
        translateY(-1px);

    box-shadow:
        0 10px 25px
        rgba(20, 60, 35, 0.06);
}


.account-type-card input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.account-type-card__icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--fn-green-softer, #f3fbf6);

    color: var(--fn-green, #168447);

    font-size: 1rem;
}


.account-type-card__content {
    min-width: 0;

    padding-right: 23px;
}


.account-type-card__content strong {
    display: block;

    color: var(--fn-text-dark, #101812);

    font-size: 0.8rem;

    font-weight: 800;
}


.account-type-card__content small {
    display: block;

    margin-top: 3px;

    color: var(--fn-muted, #6d786f);

    font-size: 0.68rem;

    line-height: 1.45;
}


.account-type-card__check {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 20px;
    height: 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid
        var(--fn-border, #e1e8e3);

    border-radius: 50%;

    background: #ffffff;

    color: transparent;

    font-size: 0.65rem;
}


.account-type-card:has(
    input:checked
) {

    border-color:
        var(--fn-green, #168447);

    background:
        var(--fn-green-softer, #f3fbf6);

    box-shadow:
        0 8px 22px
        rgba(22, 132, 71, 0.07);
}


.account-type-card:has(
    input:checked
)
.account-type-card__check {

    border-color:
        var(--fn-green, #168447);

    background:
        var(--fn-green, #168447);

    color: #ffffff;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.registration-form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 19px 16px;
}


.form-field--full {
    grid-column:
        1 / -1;
}


.form-field label {
    display: flex;

    align-items: center;

    gap: 4px;

    margin-bottom: 7px;

    color:
        var(--fn-text-dark, #101812);

    font-size: 0.77rem;

    font-weight: 700;
}


.form-field label > span:not(.optional) {
    color:
        var(--fn-danger, #dc3545);
}


.form-field label .optional {
    margin-left: 3px;

    color:
        var(--fn-muted-light, #89938c);

    font-size: 0.68rem;

    font-weight: 500;
}


/* =========================================================
   INPUT WRAPPER
   ========================================================= */

.input-wrapper,
.select-wrapper {
    position: relative;
}


.input-icon {
    position: absolute;

    top: 50%;
    left: 14px;

    transform:
        translateY(-50%);

    z-index: 2;

    color:
        var(--fn-muted-light, #89938c);

    font-size: 0.86rem;

    pointer-events: none;
}


.input-wrapper--textarea
.input-icon {
    top: 17px;

    transform: none;
}


.input-wrapper input,
.input-wrapper textarea,
.select-wrapper select {
    width: 100%;

    border: 1px solid
        var(--fn-border, #e1e8e3);

    border-radius: 11px;

    background: #ffffff;

    color:
        var(--fn-text-dark, #101812);

    font-family: inherit;

    font-size: 0.82rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.input-wrapper input {
    min-height: 47px;

    padding:
        12px 42px;
}


.input-wrapper textarea {
    min-height: 100px;

    padding:
        13px 42px;

    resize: vertical;
}


.select-wrapper select {
    min-height: 47px;

    padding:
        12px 40px 12px 42px;

    appearance: none;

    cursor: pointer;
}


.input-wrapper input:hover,
.input-wrapper textarea:hover,
.select-wrapper select:hover {
    border-color:
        var(--fn-border-dark, #ccd7cf);
}


.input-wrapper input:focus,
.input-wrapper textarea:focus,
.select-wrapper select:focus {
    border-color:
        var(--fn-green, #168447);

    box-shadow:
        0 0 0 3px
        rgba(
            22,
            132,
            71,
            0.09
        );
}


.input-wrapper input.is-invalid,
.input-wrapper textarea.is-invalid,
.select-wrapper select.is-invalid {
    border-color:
        var(--fn-danger, #dc3545);

    background:
        var(--fn-danger-soft, #fff1f2);

    box-shadow:
        0 0 0 3px
        rgba(
            220,
            53,
            69,
            0.06
        );
}


.select-arrow {
    position: absolute;

    top: 50%;
    right: 14px;

    transform:
        translateY(-50%);

    color:
        var(--fn-muted-light, #89938c);

    pointer-events: none;
}


/* =========================================================
   FIELD HINT / ERRORS
   ========================================================= */

.field-hint {
    display: block;

    margin-top: 5px;

    color:
        var(--fn-muted-light, #89938c);

    font-size: 0.66rem;

    line-height: 1.5;
}


.field-error {
    min-height: 17px;

    margin-top: 5px;

    color:
        var(--fn-danger, #dc3545);

    font-size: 0.67rem;

    line-height: 1.4;
}


/* =========================================================
   ORGANIZATION
   ========================================================= */

.organization-section {
    padding: 20px;

    border:
        1px solid
        rgba(
            22,
            132,
            71,
            0.14
        );

    border-radius: 17px;

    background:
        var(--fn-green-softer, #f3fbf6);

    animation:
        registrationSectionReveal
        0.25s ease both;
}


.organization-notice {
    display: flex;

    gap: 11px;

    margin-bottom: 18px;

    padding: 13px;

    border-radius: 12px;

    background:
        rgba(
            255,
            255,
            255,
            0.75
        );
}


.organization-notice > i {
    color:
        var(--fn-green, #168447);

    margin-top: 2px;
}


.organization-notice strong {
    display: block;

    color:
        var(--fn-text-dark, #101812);

    font-size: 0.73rem;
}


.organization-notice p {
    margin: 3px 0 0;

    color:
        var(--fn-muted, #6d786f);

    font-size: 0.67rem;

    line-height: 1.5;
}


/* =========================================================
   DOCUMENT REQUIREMENT
   ========================================================= */

.document-requirement {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 15px;

    padding: 14px;

    border:
        1px solid
        var(--fn-border, #e1e8e3);

    border-radius: 13px;

    background:
        #fafcfb;
}


.document-requirement__icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        var(--fn-danger-soft, #fff1f2);

    color:
        var(--fn-danger, #dc3545);
}


.document-requirement strong {
    display: block;

    color:
        var(--fn-text-dark, #101812);

    font-size: 0.74rem;
}


.document-requirement p {
    margin: 3px 0 0;

    color:
        var(--fn-muted, #6d786f);

    font-size: 0.67rem;

    line-height: 1.5;
}


/* =========================================================
   DOCUMENT UPLOAD
   ========================================================= */

.document-upload input[type="file"] {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


.document-upload__dropzone {
    min-height: 160px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 22px;

    border:
        1.5px dashed
        var(--fn-border-dark, #ccd7cf);

    border-radius: 15px;

    background:
        #fbfdfc;

    cursor: pointer;

    text-align: center;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.document-upload__dropzone:hover {
    border-color:
        var(--fn-green, #168447);

    background:
        var(--fn-green-softer, #f3fbf6);

    transform:
        translateY(-1px);
}


.document-upload__icon {
    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 5px;

    border-radius: 13px;

    background:
        var(--fn-green-soft, #eaf7ef);

    color:
        var(--fn-green, #168447);

    font-size: 1.1rem;
}


.document-upload__title {
    color:
        var(--fn-text-dark, #101812);

    font-size: 0.79rem;

    font-weight: 800;
}


.document-upload__text {
    color:
        var(--fn-muted, #6d786f);

    font-size: 0.68rem;
}


.document-upload__meta {
    margin-top: 4px;

    color:
        var(--fn-muted-light, #89938c);

    font-size: 0.62rem;
}


/* =========================================================
   SELECTED DOCUMENT
   ========================================================= */

.document-selected {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    border:
        1px solid
        rgba(
            22,
            132,
            71,
            0.15
        );

    border-radius: 13px;

    background:
        var(--fn-green-softer, #f3fbf6);
}


.document-selected__icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        var(--fn-danger-soft, #fff1f2);

    color:
        var(--fn-danger, #dc3545);
}


.document-selected__info {
    flex: 1;

    min-width: 0;
}


.document-selected__info strong {
    display: block;

    overflow: hidden;

    color:
        var(--fn-text-dark, #101812);

    font-size: 0.73rem;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.document-selected__info span {
    display: block;

    margin-top: 2px;

    color:
        var(--fn-muted, #6d786f);

    font-size: 0.64rem;
}


.document-selected__remove {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 9px;

    background:
        var(--fn-danger-soft, #fff1f2);

    color:
        var(--fn-danger, #dc3545);

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.document-selected__remove:hover {
    background:
        var(--fn-danger, #dc3545);

    color:
        #ffffff;
}


/* =========================================================
   PASSWORD STRENGTH
   ========================================================= */

.password-strength {
    min-height: 17px;

    margin-top: 5px;

    font-size: 0.67rem;

    font-weight: 700;
}


.password-strength--weak {
    color:
        var(--fn-danger, #dc3545);
}


.password-strength--medium {
    color:
        var(--fn-warning, #f59e0b);
}


.password-strength--strong {
    color:
        var(--fn-green, #168447);
}


/* =========================================================
   SUBMIT
   ========================================================= */

.registration-submit {
    margin-top: 10px;
}


.registration-submit__button {
    width: 100%;

    min-height: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 13px 20px;

    border: 0;

    border-radius: 12px;

    background:
        var(--fn-green, #168447);

    color: #ffffff;

    font-family: inherit;

    font-size: 0.85rem;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(
            22,
            132,
            71,
            0.16
        );

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.registration-submit__button:hover {
    background:
        var(--fn-green-dark, #0e6334);

    transform:
        translateY(-1px);

    box-shadow:
        0 14px 30px
        rgba(
            22,
            132,
            71,
            0.20
        );
}


.registration-submit__button:disabled {
    opacity: 0.72;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


.registration-submit__loading {
    display: none;

    align-items: center;

    gap: 8px;
}


.registration-submit__button.is-loading
.registration-submit__text {
    display: none;
}


.registration-submit__button.is-loading
.registration-submit__loading {
    display: inline-flex;
}


/* =========================================================
   SPINNER
   ========================================================= */

.registration-spinner {
    width: 17px;
    height: 17px;

    border:
        2px solid
        rgba(
            255,
            255,
            255,
            0.35
        );

    border-top-color:
        #ffffff;

    border-radius: 50%;

    animation:
        registrationSpinner
        0.7s linear infinite;
}


@keyframes registrationSpinner {

    to {
        transform:
            rotate(360deg);
    }

}


/* =========================================================
   LOGIN
   ========================================================= */

.registration-login {
    margin-top: 18px;

    text-align: center;

    color:
        var(--fn-muted, #6d786f);

    font-size: 0.72rem;
}


.registration-login a {
    color:
        var(--fn-green, #168447);

    font-weight: 800;

    text-decoration: none;
}


.registration-login a:hover {
    text-decoration: underline;
}


/* =========================================================
   REVEAL
   ========================================================= */

@keyframes registrationSectionReveal {

    from {
        opacity: 0;

        transform:
            translateY(-6px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .registration-container {
        grid-template-columns: 1fr;
    }


    .registration-intro {
        position: relative;

        top: auto;

        padding:
            10px 0 0;
    }


    .registration-intro__content {
        max-width: 800px;
    }


    .registration-benefits {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .registration-page {
        padding:
            28px 14px 45px;
    }


    .registration-container {
        gap: 22px;
    }


    .registration-form-wrapper {
        padding: 23px 18px;

        border-radius: 19px;
    }


    .registration-intro {
        padding: 0;
    }


    .registration-intro h1 {
        font-size: 2.15rem;
    }


    .registration-benefits {
        grid-template-columns: 1fr;
    }


    .registration-form-grid {
        grid-template-columns: 1fr;
    }


    .form-field--full {
        grid-column: auto;
    }


    .account-type-grid {
        grid-template-columns: 1fr;
    }


    .registration-section-heading {
        gap: 10px;
    }


    .registration-server-error {
        padding: 12px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .registration-page {
        padding:
            20px 10px 35px;
    }


    .registration-form-wrapper {
        padding:
            20px 14px;
    }


    .registration-intro h1 {
        font-size: 1.85rem;
    }


    .registration-form-header h2 {
        font-size: 1.55rem;
    }


    .organization-section {
        padding: 15px;
    }


    .document-upload__dropzone {
        min-height: 145px;
    }


    .registration-server-error {
        gap: 9px;
    }

}