@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

/* ==== RESET & PAGE SIZE FIX ==== */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #f8f9fa !important;
    overflow: hidden; /* prevent scroll */
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==== MAIN CONTAINER ==== */
.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: none;
}

/* ==== ERROR MESSAGE ==== */
.error-text {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin: 3px 0;
    font-weight: 500;
}

/* ==== FORM BOX ==== */
.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #333;
    text-align: center;
    padding: 25px 40px;
    z-index: 1;
    transition: 0.4s ease-in-out 1s, visibility 0s 1s;
}

.container.active .form-box {
    right: 50%;
}

.form-box.register {
    visibility: hidden;
}

.container.active .form-box.register {
    visibility: visible;
}

/* ==== FORM CONTENT ==== */
form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* ==== HEADINGS ==== */
.form-box.login h1 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #064420;
    font-weight: 700;
}

.form-box.register h1 {
    font-size: 24px;
    margin-bottom: 0;
    color: #064420;
    font-weight: 700;
}

.form-box.login p,
.form-box.register p {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

/* ==== INPUT FIELDS ==== */
.input-box-login,
.input-box-register {
    position: relative;
    margin: 5px 0;
}

.input-box-login input,
.input-box-register input {
    width: 100%;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-box-login input:focus,
.input-box-register input:focus {
    border-color: #f58220;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(245, 130, 32, 0.1);
}

.input-box-login label,
.input-box-register label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    transition: all 0.3s ease;
    pointer-events: none;
    background: #f8f9fa;
    padding: 0 5px;
}

.input-box-login input:focus ~ label,
.input-box-login input:not(:placeholder-shown) ~ label,
.input-box-register input:focus ~ label,
.input-box-register input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 11px;
    color: #f58220;
    background: #fff;
    font-weight: 600;
}

.input-box-login input::placeholder,
.input-box-register input::placeholder {
    color: transparent;
}

.input-box-login i,
.input-box-register i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: #757575;
    cursor: pointer;
    transition: color 0.3s ease;
}

.input-box-login i:hover,
.input-box-register i:hover {
    color: #f58220;
}

/* ==== LINKS & BUTTONS ==== */
.forgot-link {
    margin-top: 10px;
}

.forgot-link a {
    font-size: 13px;
    color: #064420;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link a:hover {
    color: #f58220;
    text-decoration: underline;
}

.btn {
    width: 100%;
    height: 42px;
    background: #064420;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(6, 68, 32, 0.25);
}

.btn:hover {
    background: #f58220;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 130, 32, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* ==== TOGGLE PANEL ==== */
.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.toggle-box::before {
    content: "";
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: linear-gradient(135deg, #064420 0%, #f58220 100%);
    background-size: cover;
    background-position: center;
    z-index: 2;
    transition: 1s ease-in-out;
    border-radius: 180px;
    box-shadow: 0 0 20px 10px rgba(21, 65, 59, 0.6);
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3;
    transition: 0.4s ease-in-out;
    text-align: center;
    padding: 30px;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: 0.4s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: 0.4s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1s;
}

.toggle-panel h1 {
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 700;
}

.toggle-panel p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
}

.toggle-panel .btn {
    width: 130px;
    height: 36px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    font-weight: 400;
    margin-top: 8px;
}

.toggle-panel .btn:hover {
    background: #fff;
    color: #064420;
}

.toggle-panel .logo {
    width: 180px;
    height: 180px;
    margin-bottom: 10px;
}

.toggle-panel .brand-name {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.toggle-panel .brand-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 35px;
}

/* ==== NAME CONTAINER ==== */
.name-container {
    display: flex;
    gap: 8px;
    margin: 5px 0;
}

.name-container .input-box-register {
    flex: 1;
    margin: 0;
}

/* ==== FILE UPLOAD ==== */
.file-upload-container {
    margin: 8px 0;
    width: 100%;
}

.file-upload-box {
    position: relative;
    width: 100%;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 44px;
}

.file-icon {
    font-size: 17px;
    color: #757575;
}

.file-text {
    flex: 1;
    font-size: 14px;
    color: #757575;
    text-align: left;
}

.file-upload-label {
    position: static;
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #064420;
    font-weight: 600;
}


.file-hint {
    font-size: 11px;
    color: #757575;
    margin-top: 3px;
    text-align: left;
}

/* ==== TERMS ==== */
.terms-container {
    margin: 8px 0 0 0;
    text-align: left;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #064420;
    transform: scale(1.1);
}

.terms-label {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
}

.terms-link {
    color: #064420;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    color: #f58220;
    text-decoration: underline;
}

#statusMessage {
    margin-top: 6px;
    font-size: 13px;
}

/* ==== RESPONSIVE ==== */
@media screen and (max-width: 650px) {
    .container {
        height: 100vh;
        width: 100%;
    }

    .form-box {
        bottom: 0;
        width: 100%;
        height: auto;
        padding: 20px;
        overflow-y: auto;
    }

    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 0;
    }

    .toggle-panel {
        width: 100%;
        height: 30%;
        padding: 20px;
    }

    .name-container {
        flex-direction: column;
        gap: 6px;
    }

    .file-upload-box {
        padding: 10px 14px;
    }
}
