
:root {
    --lits-forest-900: #08281E;
    --lits-forest-800: #0A3B2C;
    --lits-forest-700: #124F3B;
    --lits-gold-600: #B8841F;
    --lits-gold-400: #E0AE42;
    --lits-gold-100: #FAF1DC;
    --lits-ink: #16211C;
    --lits-bone: #FBFAF6;
}

/* =============================================================================
   6. SIGN IN / SIGN UP MODAL
   ========================================================================== */

#loginModal .modal-dialog {
    max-width: 424px;
}

#loginModal .modal-content.hb-card {
    position: relative;
    overflow: hidden;
    padding: 34px 32px 28px;
    border: 0;
    border-radius: 22px;
    background: var(--lits-bone);
    box-shadow: 0 34px 80px rgba(4,24,17,.42);
}

    /* Gold hairline across the very top of the card. */
    #loginModal .modal-content.hb-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--lits-forest-700), var(--lits-gold-400), var(--lits-forest-700));
    }

#loginModal .hb-close {
    position: absolute;
    top: 15px;
    right: 17px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(10,59,44,.06);
    color: #5B6B63;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .25s ease, color .2s ease;
}

    #loginModal .hb-close:hover {
        background: rgba(10,59,44,.12);
        color: var(--lits-forest-800);
        transform: rotate(90deg);
    }

/* ---- Header: livestock traceability mark ----------------------------------- */

.lits-modal-head {
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #EAF0EB;
}

.lits-modal-medallion {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--lits-forest-700) 0%, var(--lits-forest-800) 60%, var(--lits-forest-900) 100%);
    box-shadow: 0 12px 28px rgba(10,59,44,.32), inset 0 1px 0 rgba(255,255,255,.14);
}

    /* Thin gold ring around the medallion. */
    .lits-modal-medallion::before {
        content: "";
        position: absolute;
        inset: -5px;
        border-radius: 50%;
        border: 1.5px solid rgba(224,174,66,.55);
    }

#loginModal .hb-logo {
    width: 58px;
    height: auto;
    margin: 0;
}

/* ---- Fields ----------------------------------------------------------------- */

.lits-field {
    position: relative;
    margin-bottom: 16px;
}

.lits-field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #A6B4AC;
    font-size: .95rem;
    pointer-events: none;
    transition: color .2s ease;
}

.lits-field:focus-within .lits-field-icon {
    color: var(--lits-forest-700);
}

#loginModal .hb-input {
    width: 100%;
    height: 62px;
    padding: 24px 16px 8px 47px;
    border: 1px solid #DCE4DE;
    border-radius: 14px;
    background: #ffffff;
    color: var(--lits-ink);
    font-size: 1rem;
    line-height: 1.2;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    #loginModal .hb-input::placeholder {
        color: transparent;
    }

    #loginModal .hb-input:focus {
        border-color: var(--lits-forest-700);
        box-shadow: 0 0 0 4px rgba(18,79,59,.12);
        outline: none;
    }

    #loginModal .hb-input:-webkit-autofill {
        -webkit-text-fill-color: var(--lits-ink);
        box-shadow: 0 0 0 40px #ffffff inset;
    }

.lits-field label {
    position: absolute;
    left: 48px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    margin: 0;
    color: #8A9A92;
    font-size: 1rem;
    font-weight: 400;
    pointer-events: none;
    transition: top .18s ease, font-size .18s ease, color .18s ease, transform .18s ease;
}

.lits-field .hb-input:focus ~ label,
.lits-field .hb-input:not(:placeholder-shown) ~ label {
    top: 13px;
    transform: translateY(0);
    color: var(--lits-forest-700);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
}

#loginModal #loginPassword {
    padding-right: 48px;
}

#loginModal .hb-eye {
    position: absolute;
    right: 16px;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    color: #8A9A92;
    cursor: pointer;
    transition: color .2s ease;
}

    #loginModal .hb-eye:hover {
        color: var(--lits-forest-700);
    }

/* ---- Sign In ---------------------------------------------------------------- */

#loginModal .hb-login-btn {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 56px;
    margin-top: 6px;
    padding: 0 22px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: linear-gradient(180deg, #43A851 0%, #2E7D32 62%, #2A7530 100%);
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: .012em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.32),
                0 1px 2px rgba(6,40,28,.24),
                0 12px 26px -8px rgba(24,96,48,.58);
    transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s ease, background .22s ease;
}

    #loginModal .hb-login-btn:hover {
        background: linear-gradient(180deg, #4AB159 0%, #338A38 62%, #2E8034 100%);
        transform: translateY(-2px);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.36),
                    0 2px 4px rgba(6,40,28,.22),
                    0 20px 36px -10px rgba(24,96,48,.66);
    }

    #loginModal .hb-login-btn:active {
        transform: translateY(0);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.26),
                    0 1px 2px rgba(6,40,28,.3),
                    0 6px 14px -4px rgba(24,96,48,.46);
    }

    #loginModal .hb-login-btn:focus-visible {
        outline: 3px solid #A5D6A7;
        outline-offset: 3px;
    }

#loginModal .hb-btn-icon,
#loginModal #spanLoginIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    align-self: auto;
    width: 38px;
    height: 38px;
    min-height: 0;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #ffffff;
    font-size: .85rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26);
    transition: transform .26s cubic-bezier(.2,.8,.3,1), background .26s ease;
}

#loginModal .hb-login-btn:hover #spanLoginIcon {
    transform: translateX(4px);
    background: rgba(255,255,255,.24);
}

#loginModal .hb-login-btn .login-label {
    flex: 0 0 auto;
}

/* ---- Terms + links ---------------------------------------------------------- */

#loginModal .hb-terms {
    margin: 18px 0 0;
    color: #7A8A82;
    font-size: .8rem;
    line-height: 1.5;
}

    #loginModal .hb-terms a {
        color: var(--lits-forest-700);
        font-weight: 700;
        text-decoration: none;
    }

        #loginModal .hb-terms a:hover {
            text-decoration: underline;
        }

#loginModal .hb-links {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #EAF0EB;
}

#loginModal .hb-link-action {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 8px;
    border: 1px solid #E5EBE6;
    border-radius: 999px;
    background: #ffffff;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

    #loginModal .hb-link-action:hover {
        border-color: #CFE0D6;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(8,40,30,.09);
        text-decoration: none;
    }

#loginModal .hb-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: .7rem;
}

#loginModal #btnForgotPassword .hb-icon {
    background: var(--lits-gold-100);
    color: var(--lits-gold-600);
}

#loginModal #btnSignUp .hb-icon {
    background: #E4F0EA;
    color: var(--lits-forest-700);
}

#loginModal #btnSignUp {
    color: var(--lits-forest-700);
}

#loginModal #btnForgotPassword {
    color: #6E7E76;
}

/* =============================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    #loginModal * {
        animation: none !important;
        transition: none !important;
    }
}
