* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #f4fbf5 0%, #e2eee3 55%, #d4e5d6 100%);
    overflow-x: hidden;
    overflow-y: auto;
    color: #143823;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px 16px;
    box-sizing: border-box;
}

.top-nav-bar {
    width: 100%;
    max-width: 660px;
    display: flex;
    justify-content: flex-start;
    margin: 0 auto 12px;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #14532d;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    max-width: 100%;
    white-space: nowrap;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(25, 135, 84, 0.35);
    box-shadow: 0 4px 14px rgba(25, 135, 84, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: 0.25s ease;
}

.back-home-link i {
    font-size: 18px;
    color: #198754;
    transition: color 0.25s;
}

.back-home-link:hover {
    color: #ffffff;
    background: #198754;
    border-color: #198754;
    box-shadow: 0 6px 18px rgba(25, 135, 84, 0.3);
}

.back-home-link:hover i {
    color: #ffffff;
}

/* ================= CONTAINER ================= */
.container {
    position: relative;
    width: 660px;
    height: 420px;
    background: #ffffff;
    border: 2px solid #198754;
    box-shadow: 0 16px 40px rgba(25, 135, 84, 0.18),
                0 0 28px rgba(234, 179, 8, 0.2),
                inset 0 0 15px rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    overflow: hidden;
}

/* Background image for Login: Blooming sunflowers & golden sunflower oil */
.container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(246, 252, 247, 0.82) 100%),
                      url('img/sunflower-bg.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* Background image for Register: Green, yellow, and red bell peppers */
.container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.82) 0%, rgba(246, 252, 247, 0.78) 100%),
                      url('img/bell-peppers-bg.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.container.active::before {
    opacity: 0;
}

.container.active::after {
    opacity: 1;
}

/* ================= CURVED ANIMATED BACKGROUND SHAPES ================= */
/* Rich vegetable green to sunflower gold gradient in login mode */
.curved-shape {
    position: absolute;
    right: 0;
    top: -5px;
    height: 520px;
    width: 700px;
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.94) 0%, rgba(25, 135, 84, 0.88) 45%, rgba(245, 158, 11, 0.88) 100%),
                url('img/sunflower-bg.jpg') center/cover no-repeat;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: rotate(10deg) skewY(40deg);
    transform-origin: bottom right;
    transition: 1.2s cubic-bezier(0.65, 0, 0.35, 1);
    transition-delay: 1.0s;
    z-index: 1;
}

/* In Register mode: showcases green, yellow, and red bell peppers on the left side */
.container.active .curved-shape {
    transform: rotate(0deg) skewY(0deg);
    transition-delay: 0.3s;
    background: linear-gradient(180deg, rgba(14, 43, 22, 0.50) 0%, rgba(10, 30, 16, 0.78) 100%),
                url('img/bell-peppers-bg.jpg') center/cover no-repeat;
}

/* Light crystalline shape for Register form */
.curved-shape2 {
    position: absolute;
    left: 205px;
    top: 100%;
    height: 590px;
    width: 700px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 252, 247, 0.96) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 2.5px solid #198754;
    transform: rotate(0deg) skewY(0deg);
    transform-origin: bottom left;
    transition: 1.2s cubic-bezier(0.65, 0, 0.35, 1);
    transition-delay: 0.3s;
    z-index: 2;
}

.container.active .curved-shape2 {
    transform: rotate(-11deg) skewY(-41deg);
    transition-delay: 0.9s;
}

/* ================= FORM BOXES ================= */
.form-box {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 30px;
    z-index: 10;
    overflow: hidden;
}

.form-box.Login {
    left: 0;
}

.form-box.Register {
    right: 0;
    pointer-events: none;
    padding: 0 26px;
}

.container.active .form-box.Register {
    pointer-events: auto;
}

.container.active .form-box.Login {
    pointer-events: none;
}

.form-box h2 {
    font-family: "Comic Relief", system-ui, sans-serif;
    font-size: 23px;
    color: #14532d;
    text-align: center;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

/* ================= PRODUCE STRIP ON REGISTER FORM ================= */
.register-peppers-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(25, 135, 84, 0.08);
    border: 1px solid rgba(25, 135, 84, 0.22);
    border-radius: 8px;
    padding: 3px 6px;
    margin-bottom: 4px;
}

.peppers-strip-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(25, 135, 84, 0.35);
    flex-shrink: 0;
}

.peppers-strip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.peppers-pill-group {
    display: flex;
    gap: 4px;
    margin-bottom: 1px;
}

.peppers-pill-group .pill {
    font-size: 8.5px;
    font-weight: 700;
    padding: 0 5px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.peppers-pill-group .pill.green { background: rgba(34, 197, 94, 0.2); color: #15803d; border: 0.5px solid rgba(34, 197, 94, 0.4); }
.peppers-pill-group .pill.yellow { background: rgba(234, 179, 8, 0.2); color: #a16207; border: 0.5px solid rgba(234, 179, 8, 0.4); }
.peppers-pill-group .pill.red { background: rgba(239, 68, 68, 0.2); color: #b91c1c; border: 0.5px solid rgba(239, 68, 68, 0.4); }

.peppers-subtitle {
    font-size: 9.5px;
    color: #3b5f47;
    font-weight: 600;
}

/* Input Fields with Floating Underlines */
.input-box {
    position: relative;
    width: 100%;
    height: 38px;
    border-bottom: 2px solid #a3cfbb;
    margin: 9px 0 2px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-box.Register .input-box {
    height: 34px;
    margin: 6px 0 2px;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13.5px;
    color: #143823;
    font-weight: 600;
    padding-right: 28px;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 13px;
    color: #476652;
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-box input:focus ~ label,
.input-box input:valid ~ label,
.input-box.has-val label {
    top: -4px;
    font-size: 10.5px;
    color: #157347;
    font-weight: 600;
}

.input-box input:focus {
    border-bottom-color: #198754;
}

.input-box i {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-size: 17px;
    color: #3b7a57;
    transition: 0.3s ease;
}

.input-box i.toggle-pass {
    cursor: pointer;
    user-select: none;
    padding: 3px;
}

.input-box i.toggle-pass:hover {
    color: #157347;
}

.input-box input:focus ~ i,
.input-box input:valid ~ i {
    color: #198754;
}

/* ================= PASSWORD STRENGTH METER ================= */
.strength-container {
    width: 100%;
    margin-top: 2px;
    margin-bottom: 3px;
    transition: 0.3s ease;
}

.strength-bar-track {
    width: 100%;
    height: 3px;
    background: #e2ece3;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.strength-bar.weak {
    width: 25%;
    background-color: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.5);
}

.strength-bar.fair {
    width: 50%;
    background-color: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.5);
}

.strength-bar.good {
    width: 75%;
    background-color: #198754;
    box-shadow: 0 0 6px rgba(25, 135, 84, 0.5);
}

.strength-bar.strong {
    width: 100%;
    background-color: #0f766e;
    box-shadow: 0 0 8px rgba(15, 118, 110, 0.7);
}

.strength-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    min-height: 14px;
}

.strength-label {
    font-weight: 600;
    color: #476652;
    transition: color 0.3s;
}

.strength-label.weak { color: #dc3545; }
.strength-label.fair { color: #ca8a04; }
.strength-label.good { color: #198754; }
.strength-label.strong { color: #0f766e; }

.strength-hint {
    color: #476652;
    font-size: 10px;
}

/* ================= LOCKOUT WARNING ================= */
.lockout-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #b91c1c;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    margin-top: 5px;
}

/* Button with Fresh Vegetable Leaf Green & Sunflower Gold Accent */
.btn-box {
    margin-top: 8px;
    width: 100%;
}

.form-box.Register .btn-box {
    margin-top: 5px;
}

.btn {
    width: 100%;
    height: 38px;
    background: linear-gradient(90deg, #157347 0%, #198754 55%, #1e9b62 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    outline: none;
    border-radius: 36px;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(25, 135, 84, 0.32);
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.form-box.Register .btn {
    height: 35px;
    font-size: 13.5px;
}

.btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.45), 0 0 12px rgba(245, 158, 11, 0.4);
    background: linear-gradient(90deg, #12633d 0%, #157347 55%, #198754 100%);
    transform: translateY(-2px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.5);
    box-shadow: none;
}

/* Links to switch form */
.logreg-link {
    font-size: 12px;
    text-align: center;
    margin-top: 7px;
}

.form-box.Register .logreg-link {
    font-size: 11px;
    margin-top: 5px;
}

.logreg-link p {
    color: #4b6354;
    display: inline-block;
    margin-right: 4px;
}

.logreg-link a {
    color: #157347;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.25s;
}

.logreg-link a:hover {
    text-decoration: underline;
    color: #ca8a04;
}

/* ================= PRODUCE PREVIEW CARD IN INFO TEXT ================= */
.produce-preview-card {
    position: relative;
    width: 100%;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.produce-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.produce-preview-card:hover .produce-card-img {
    transform: scale(1.05);
}

.produce-card-badge {
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(10, 26, 14, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 600;
}

.produce-card-badge.gold {
    background: rgba(38, 28, 10, 0.85);
    color: #fef08a;
    border-color: rgba(245, 158, 11, 0.4);
}

.pepper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.pepper-dot.green { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.pepper-dot.yellow { background: #eab308; box-shadow: 0 0 6px #eab308; }
.pepper-dot.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

/* ================= INFO TEXT PANELS ================= */
.info-text {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

/* Login Info: Confined to right half and right-aligned */
.info-text.Login {
    right: 0;
    text-align: right;
    padding: 0 26px 0 15px;
    align-items: flex-end;
}

/* Register Info: Confined to left half and left-aligned */
.info-text.Register {
    left: 0;
    text-align: left;
    padding: 0 15px 0 26px;
    align-items: flex-start;
}

.info-text h2 {
    font-family: "Comic Relief", system-ui, sans-serif;
    font-size: 21px;
    color: #ffffff;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.info-text p {
    font-size: 11.5px;
    color: #f0fdf4;
    line-height: 1.4;
    max-width: 210px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* ================= STAGGERED ENTRANCE & EXIT ANIMATIONS ================= */
.form-box.Login .animation {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition: 0.7s ease;
    transition-delay: calc(0.1s + var(--li, 0s));
}

.container.active .form-box.Login .animation {
    transform: translateX(-120%);
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(0.05s + var(--lo, 0s));
}

.info-text.Login .animation {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition: 0.7s ease;
    transition-delay: calc(0.1s + var(--li, 0s));
}

.container.active .info-text.Login .animation {
    transform: translateX(120%);
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(0.05s + var(--lo, 0s));
}

.form-box.Register .animation {
    transform: translateX(120%);
    opacity: 0;
    filter: blur(10px);
    transition: 0.7s ease;
    transition-delay: calc(0.05s + var(--lo, 0s));
}

.container.active .form-box.Register .animation {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(0.1s + var(--li, 0s));
}

.info-text.Register .animation {
    transform: translateX(-120%);
    opacity: 0;
    filter: blur(10px);
    transition: 0.7s ease;
    transition-delay: calc(0.05s + var(--lo, 0s));
}

.container.active .info-text.Register .animation {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(0.1s + var(--li, 0s));
}

/* ================= TOAST NOTIFICATION ================= */
.toast {
    position: fixed;
    top: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #ffffff;
    border: 1.5px solid #198754;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 15px rgba(25, 135, 84, 0.2);
    color: #143823;
    font-size: 13.5px;
    font-weight: 600;
    transform: translateY(-80px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    z-index: 1000;
    max-width: 380px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: #198754;
    box-shadow: 0 8px 30px rgba(25, 135, 84, 0.15), 0 0 15px rgba(25, 135, 84, 0.25);
}
.toast.success i { color: #198754; font-size: 20px; }

.toast.error {
    border-color: #dc3545;
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.15), 0 0 15px rgba(220, 53, 69, 0.25);
}
.toast.error i { color: #dc3545; font-size: 20px; }

.toast.warning {
    border-color: #eab308;
    box-shadow: 0 8px 30px rgba(234, 179, 8, 0.15), 0 0 15px rgba(234, 179, 8, 0.25);
}
.toast.warning i { color: #ca8a04; font-size: 20px; }

/* ================= AUTHENTICATED ACTIVE SESSION VIEW ================= */
.auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.auth-card {
    background: #ffffff;
    border: 2px solid #198754;
    box-shadow: 0 16px 40px rgba(25, 135, 84, 0.22);
    border-radius: 18px;
    padding: 26px 36px;
    text-align: center;
    max-width: 380px;
    width: 90%;
}

.auth-shield-icon {
    font-size: 50px;
    color: #198754;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(25, 135, 84, 0.4));
}

.auth-card h2 {
    font-size: 22px;
    color: #14532d;
    margin-bottom: 5px;
    font-weight: 700;
}

.auth-user-msg {
    font-size: 13.5px;
    color: #355340;
    margin-bottom: 10px;
}

.auth-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.35);
    color: #157347;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.auth-dot {
    width: 7px;
    height: 7px;
    background: #198754;
    border-radius: 50%;
    box-shadow: 0 0 8px #198754;
}

.btn-go-home {
    margin-bottom: 10px;
}

.btn-logout {
    background: linear-gradient(90deg, #e2ece3, #d4e5d6);
    color: #14532d;
    border: 1.5px solid rgba(25, 135, 84, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-logout:hover {
    box-shadow: 0 6px 18px rgba(25, 135, 84, 0.25);
    background: linear-gradient(90deg, #d4e5d6, #c2dcc5);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 700px) {
    .wrapper {
        padding: 16px 12px;
        justify-content: flex-start;
        overflow-x: hidden;
    }

    .top-nav-bar {
        max-width: 420px;
        width: 100%;
        margin-bottom: 10px;
        padding: 0 4px;
        box-sizing: border-box;
    }

    .back-home-link {
        font-size: 11.5px;
        padding: 5px 12px;
        gap: 5px;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .back-home-link i {
        font-size: 15px;
        flex-shrink: 0;
    }

    .container {
        width: 100%;
        max-width: 420px;
        height: 530px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .form-box,
    .info-text {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .info-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding: 12px 8px;
        overflow-x: hidden;
    }

    .top-nav-bar {
        max-width: 100%;
        width: 100%;
        padding: 0 2px;
        margin: 0 auto 8px;
        box-sizing: border-box;
    }

    .back-home-link {
        font-size: 11px;
        padding: 5px 10px;
        gap: 4px;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .container {
        max-width: 100%;
        width: 100%;
        border-radius: 18px;
        height: auto;
        min-height: 480px;
        padding-bottom: 16px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .form-box {
        width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .form-box h2 {
        font-size: 22px;
    }

    .input-box {
        margin: 16px 0;
    }
}

@media (max-width: 360px) {
    .wrapper {
        padding: 10px 4px;
    }

    .back-home-link {
        font-size: 10.5px;
        padding: 4px 8px;
        gap: 4px;
    }

    .back-home-link i {
        font-size: 14px;
    }

    .form-box {
        padding: 0 10px;
    }

    .container {
        border-radius: 14px;
    }
}
