* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: "Poppins", Arial, sans-serif; 
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #fdf6f0, #fff8f0);
}

.login-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    display: flex;
    max-width: 950px;
    width: 100%;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    background: #fff8f0;
    transition: transform 0.3s;
}
.login-container:hover { transform: translateY(-5px); }

.login-left {
    flex: 1;
    background: #fff3e8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: center;
}


.login-left h2 { 
    font-size: 2.2em; 
    color: #a65b35; 
    margin-bottom: 15px; 
}
.login-left p { 
    font-size: 1em; 
    color: #552915; 
    line-height: 1.6; 
    max-width: 320px;
}

.login-right {
    flex: 1;
    background: #552915;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}
.login-box { 
    width: 100%; 
    max-width: 380px; 
    color: #fff; 
}
.login-box h2 { 
    font-size: 2em; 
    margin-bottom: 10px; 
    color: #fff8f0;
}
.login-box p { 
    color: #f2e6dc; 
    margin-bottom: 20px; 
    font-size: 0.95em;
}

.login-box input, 
.login-box select {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: none;
    outline: none;
    font-size: 1em;
    transition: all 0.3s;
}
.login-box input[type="text"], 
.login-box input[type="email"], 
.login-box input[type="password"], 
.login-box input[type="tel"], 
.login-box select {
    background: #fff; 
    color: #552915;
}
.login-box input:focus, 
.login-box select:focus {
    box-shadow: 0 0 8px rgba(255, 165, 83, 0.6);
}
.input-error { border: 2px solid #ff6961; }
.error-msg { 
    color: #ff6961; 
    font-size: 0.85em; 
    margin-bottom: 12px; 
    display: none; 
}
.row { display: flex; gap: 15px; }
.row input, .row select { flex: 1; }

.login-box input[disabled] { 
    background: #eaeaea; 
    color: #777; 
    cursor: not-allowed; 
    border: 1px solid #ccc; 
    font-style: italic; 
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.password-input-wrapper {
    position: relative; 
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    padding-right: 40px; 
    margin-bottom: 0; 
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%); 
    cursor: pointer;
    color: #a65b35; 
    z-index: 10;
    font-size: 1.1em;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #552915;
}



#sendOtpBtn {
    margin-top: 8px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #a65b35;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}
#sendOtpBtn:hover { 
    background: #fff8f0; 
    color: #552915; 
    border: 1px solid #552915; 
}

#otpPopup input[type="text"], 
#otpPopup input[type="number"],
#otpInput {
    width: 80%;
    max-width: 250px;
    padding: 14px;
    margin: 12px auto;
    display: block;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 1.2em;
    text-align: center;
    background: #fff;
    color: #552915;
}
#otpPopup input:focus {
    box-shadow: 0 0 8px rgba(255, 165, 83, 0.6);
}

.signin-btn {
    width: 100%;
    padding: 16px;
    background: #a65b35;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.signin-btn:hover { 
    background: #fff8f0; 
    color: #552915; 
    border: 1px solid #552915; 
    transform: translateY(-2px);
}

.checkbox-group { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 20px; 
}
.checkbox-group input[type="checkbox"] { 
    width: 20px; 
    height: 20px; 
    margin: 0; 
    flex-shrink: 0; 
    accent-color: #a65b35;
}
.checkbox-group label { 
    color: #f2e6dc; 
    font-size: 0.95em; 
    cursor:pointer; 
}
.checkbox-group label a { 
    color: #fff8f0; 
    text-decoration: underline; 
}

.register-text { 
    text-align: center; 
    margin-top: 20px; 
    font-size: 0.9em; 
}
.register-text a { 
    color: #f2e6dc; 
    text-decoration: underline; 
}

.message-popup, 
#termsPopup, 
#otpPopup {
    display: none;
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 3000; 
}

.message-content {
    background: #fff8f0;
    padding: 30px 25px;
    border-radius: 20px;
    width: 420px;
    max-width: 90%;
    text-align: center;
    color: #552915;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: popupFade 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.countdown-timer {
    color: #dc3545; 
    font-weight: bold;
    font-size: 1.1em;
}

#resendEmailBtn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #a65b35;
    cursor: pointer;
    font-weight: bold;
    background: #a65b35;
    color: #fff;
    transition: 0.3s;
    margin-top: 5px; 
    width: 100%;
}
#resendEmailBtn:hover:not([disabled]) {
    background: #552915;
    border-color: #552915;
    color: #fff8f0;
}
#resendEmailBtn[disabled] {
    background: #cccccc;
    color: #666666;
    border-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.8;
}
#resendTimerDisplay {
    font-size: 0.85em;
    color: #552915;
    text-align: center;
    margin-top: -10px; 
    font-style: italic;
}


.terms-content {
    background: #fffefb;
    padding: 35px 30px;
    border-radius: 22px;
    width: 600px; 
    max-width: 95%;
    max-height: 80vh; 
    text-align: left; 
    color: #3d1f0f;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: popupFade 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.terms-body {
    flex-grow: 1; 
    max-height: 55vh; 
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.7;
    font-size: 0.95em;
    scroll-behavior: smooth; 
}

.terms-body h3, 
.terms-body h2 {
    margin-top: 18px;
    margin-bottom: 8px;
    color: #a65b35;
    font-size: 1.1em;
}

.terms-body p {
    margin-bottom: 12px;
}
.terms-body ul {
    margin: 8px 0 15px 20px;
    padding-left: 15px;
}
.terms-body li {
    margin-bottom: 8px;
}

.terms-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0; 
}
.message-content button, 
.terms-actions button {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    background: #a65b35;
    color: #fff;
    transition: 0.3s;
}
.message-content button:hover, 
.terms-actions button:hover {
    background: #fff8f0; 
    color: #552915; 
    border: 1px solid #552915;
}

#verifyOtpBtn {
    background: #28a745 !important; 
    color: #fff !important;
}
#verifyOtpBtn:hover {
    background: #218838 !important;
}
.cancel-btn {
    background: #dc3545 !important; 
    color: #fff !important;
}
.cancel-btn:hover {
    background: #b52a37 !important;
}

#otpPopup .error-msg {
    display: block; 
    margin-top: 5px;
    font-size: 0.9em;
    text-align: center;
    z-index: 3500; 
    position: relative;
}

@keyframes popupFade {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }
    .login-left, .login-right { 
        padding: 30px; 
        flex: none;
    }
    .row { flex-direction: column; gap: 0; }

    .terms-content {
        width: 95%;
        height: 95%;
        max-height: 95%;
        border-radius: 15px;
        padding: 20px;
    }
    .terms-body {
        max-height: 70vh;
    }
}
