/* ============= RESET & BASE ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    font-family: 'Poppins', system-ui, sans-serif;
    background: #ffffff;
    color: #111;
}



a {
    text-decoration: none;
    color: inherit;
}

/* ============= VISION SECTION ============= */
.vision-section {
    font-family: 'Poppins', system-ui, sans-serif;
    background: linear-gradient(87deg, rgb(205 201 237 / 50%), rgb(191 228 245 / 45%));
    padding: 40px 12px;
    text-align: center;
}
.vision-section b {
    color: var(--black);
}

.vision-section p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--black);
    max-width: 1000px;
    margin: 0 auto;
    max-width: 80%;
}

/* ============= AUTH CARD WRAPPER ============= */
.auth-card {
    font-family: 'Poppins', system-ui, sans-serif;
    background: linear-gradient(87deg, rgb(205 201 237 / 50%), rgb(191 228 245 / 45%));
    display: block;
    margin: 2rem auto 4rem auto;
    width: 450px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

/* ============= TABS ============= */
.auth-tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.auth-tabs button {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 16px;
    font-family: 'Poppins', system-ui, sans-serif;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
    color: #555;
    font-weight: 400;
}

.auth-tabs button.active {
    border-bottom: 2px solid #007bff;
    font-weight: bold;
    color: #111;
}

.auth-tabs button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-bottom-color: transparent;
}

/* ============= WRAPPER VISIBILITY ============= */
.signup-wrapper,
.login-wrapper {
    display: none;
}

.signup-wrapper.active,
.login-wrapper.active {
    display: block;
}

.container,
.login-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* ============= FORM GROUP SPACING ============= */
.form-group {
    margin-bottom: 14px;
}

/* ============= SHARED INPUT STYLES ============= */
.signup-form input[type="email"],
.signup-form input[type="password"],
.signup-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"],
#otp-section input[type="text"],
#otp-section input[type="email"],
#otp-section input[type="password"],
#forgot-password-container input[type="email"],
#forgot-password-container input[type="password"],
#forgot-password-container input[type="text"],
.form-group input {
    font-family: 'Poppins', system-ui, sans-serif;
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    font-size: 15px;
    color: #31353de0;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signup-form input:hover,
.login-form input:hover,
#forgot-password-container input:hover,
#otp-section input:hover {
    border-color: #121213;
}

.signup-form input:focus,
.login-form input:focus,
#forgot-password-container input:focus,
#otp-section input:focus {
    border-color: #121213;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

/* ============= BUTTONS — PRIMARY ============= */
.signup-form button[type="submit"],
.login-form button[type="submit"],
#otp-section button[type="button"]:not(#resend-otp),
#sendOtpBtn,
#verifyOtpBtn,
#resetForm button[type="submit"] {
    font-family: 'Poppins', system-ui, sans-serif;
    background-color: #5835f2d8;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    margin: 0 auto 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    font-weight: 400;
}

.signup-form button[type="submit"]:hover,
.login-form button[type="submit"]:hover,
#otp-section button[type="button"]:not(#resend-otp):hover,
#sendOtpBtn:hover,
#verifyOtpBtn:hover,
#resetForm button[type="submit"]:hover {
    background-color: #0056b3;
}

/* ============= BUTTONS — GHOST LINK (Resend OTP) ============= */
/*
  #resend-otp   → signup OTP section  (shown/hidden by JS via style.display)
  #resendOtpBtn → forgot-password step 2 (disabled/enabled by JS)
*/
#resend-otp,
#resendOtpBtn {
    font-family: 'Poppins', system-ui, sans-serif;
    /* background: none !important; */
    background-color: #5835f2d8;
    border: none !important;
    box-shadow: none !important;
    /* padding: 0 !important; */
    padding: 10px;
    /* margin: 10px auto 0 !important; */
    margin: 10px auto 0;
    display: block; /* Initially hidden; shown by JS when needed */
    color: #fbfbfb;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease;
    border-radius: 10px;
}

#resend-otp:hover,
#resendOtpBtn:hover:not(:disabled) {
    /* text-decoration: underline; */
    background-color: #2563eb;
    color: #fbfbfb;
}

#resendOtpBtn:disabled {
    opacity: 0.40;
    cursor: not-allowed;
    color: #999;
}

/* ============= CHECKBOX LINE ============= */
.checkbox-line,
.reset-check {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    margin: 6px 0 12px;
    cursor: pointer;
    user-select: none;
}

/* ============= HIDE EMPTY MESSAGE DIVS ON PAGE LOAD ============= */
/*
  Prevents colored strips before JS writes anything into them.
  Once JS sets .innerText or .innerHTML, :empty no longer matches
  and the element becomes visible automatically.
*/
.fail-message:empty,
.otp-error-message:empty,
.success-message:empty,
.otp-status:empty,
#error-message:empty,
#error-message-login:empty,
#otp-error-message:empty,
#otp-status:empty,
#verify-status:empty,
#reset-message:empty {
    display: none !important;
}

/* ============================================================
   MESSAGE CLASSES — exactly as assigned by signupp.js:

   JS sets className = "fail-message"    → always an ERROR
   JS sets className = "success-message" → always a SUCCESS
   JS sets className = "otp-status"      → neutral/loading state
                                           ("Sending OTP...", "Verifying...")

   Elements affected:
     #error-message       → .fail-message   (signup form errors)
     #error-message-login → .fail-message   (login form errors)
     #otp-error-message   → .otp-error-message (signup OTP errors)
     #otp-status          → starts as .otp-status, then JS switches to
                            .success-message or .fail-message
     #verify-status       → same pattern as #otp-status
     #reset-message       → same pattern as #otp-status
============================================================ */

/* RED — error state */
.fail-message,
.otp-error-message {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    color: #c0392b;
    background: rgba(231, 76, 60, 0.12);
    text-align: center;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* GREEN — success state */
.success-message {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    color: #27ae60;
    background: rgba(46, 204, 113, 0.12);
    text-align: center;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* NEUTRAL — loading/transitional state set by JS before response arrives */
.otp-status {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    color: #27ae60;
    background: rgba(46, 204, 113, 0.12);
    text-align: center;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* Input border error highlight */
.input-error {
    border: 2px solid #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.field-error-msg {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ============= ADDITIONAL LINKS ============= */
.additional-links {
    margin-top: 12px;
    text-align: center;
}

.additional-links p {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.additional-links a {
    color: #6c63ff;
    font-weight: 600;
}

.additional-links a:hover {
    text-decoration: underline;
}

/* ============= SIGNUP OTP CARD ============= */
.otp-form-container {
    display: none;
    background: linear-gradient(87deg, rgb(205 201 237 / 50%), rgb(191 228 245 / 45%));
    border-radius: 14px;
    padding: 28px 26px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    animation: fadeSlideIn 0.35s ease-out;
    text-align: center;
}

.otp-form-container h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.otp-form-container p {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}

/* OTP digit input — signup flow */
#otp-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1.8px solid #dcdcdc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    margin: 8px 0 0 0;
}

#otp-input:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
}

/* Timer text */
#otp-expiry-timer,
.otp-expiry-timer {
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 4px;
}

/* Back link inside signup OTP section */
.otp-link {
    margin-top: 10px;
    text-align: left;
    font-size: 0.85rem;
}

.otp-link a {
    color: #6c63ff;
    font-weight: 500;
}

.otp-link a:hover {
    text-decoration: underline;
}

/* ============= SMOOTH ANIMATION ============= */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============= LOGIN / SIGNUP CONTAINERS ============= */
.sign-up-container,
.signup-form-container,
.login-form {
    width: 100%;
}

/* ============= BACK / FORGOT LINKS ============= */
.back {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #666;
}

.back a {
    color: #6c63ff;
    font-weight: 500;
}

.back a:hover {
    text-decoration: underline;
}

/* ============= FORGOT PASSWORD SECTION ============= */
.forgot_password {
    width: 100%;
    margin-top: 6px;
    animation: fadeSlideIn 0.35s ease-out;
}

.forgot_password h2 {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.forgot_password label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    display: block;
    margin-bottom: 4px;
    margin-top: 8px;
}

/* Resend wrapper — stacks button above countdown text */
.resend-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 10px;
}

/* "Resend available in Xs" countdown */
#countdownText,
.countdownText {
    font-size: 0.82rem;
    color: #666;
    display: block;
    text-align: center;
    margin-top: 2px;
    font-family: 'Poppins', system-ui, sans-serif;
}

/* ============= FOOTER ============= */
/* footer {
    background: #101828;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 9px 0;
    font-size: 0.85rem;
    font-family: 'Poppins', system-ui, sans-serif;
} */

/* ============= RESPONSIVE ============= */
/* @media (max-width: 768px) {
    .auth-card { */
        /* width: 90%; */
        /* width: 70%;
        padding: 20px 18px;
        margin: 2rem auto;
    }

    .auth-tabs button {
        font-size: 14px;
    }

    .vision-section p {
        font-size: 0.875rem;
        text-align: left;
    }
} */

/* ══════════════════════════════════════════════════════════════
   AUTH PAGE — RESPONSIVE MEDIA QUERIES
   ══════════════════════════════════════════════════════════════ */

/* ── TABLET ≤ 1024px ── */
@media (max-width: 1024px) {
    .auth-card {
        width: 420px;
        padding: 26px;
        margin-top: 100px;
    }
}

/* ── TABLET ≤ 768px (iPad Mini) ── */
@media (max-width: 768px) {
    .vision-section {
        padding: 24px 16px;
    }

    .vision-section p {
        max-width: 100%;
        font-size: 0.9rem;
    }

    .auth-card {
        width: 90%;
        max-width: 480px;
        padding: 24px 20px;
        margin: 5.4rem auto 8.3rem auto;
        border-radius: 16px;
    }

    .auth-tabs button {
        font-size: 14px;
        padding: 8px;
    }

    .signup-form input[type="email"],
    .signup-form input[type="password"],
    .signup-form input[type="text"],
    .login-form input[type="email"],
    .login-form input[type="password"],
    #otp-section input[type="text"],
    #forgot-password-container input[type="email"],
    #forgot-password-container input[type="password"],
    #forgot-password-container input[type="text"],
    .form-group input {
        font-size: 14px;
        padding: 9px 10px;
    }

    .signup-form button[type="submit"],
    .login-form button[type="submit"],
    #otp-section button[type="button"]:not(#resend-otp),
    #sendOtpBtn,
    #verifyOtpBtn,
    #resetForm button[type="submit"] {
        font-size: 14px;
        padding: 9px 20px;
        width: 100%;
    }

    #resend-otp,
    #resendOtpBtn {
        font-size: 0.85rem;
        padding: 9px;
        width: 100%;
    }

    .otp-form-container {
        padding: 22px 18px;
    }

    #otp-input {
        font-size: 1.2rem;
        letter-spacing: 6px;
        padding: 10px 8px;
    }

    .forgot_password h2 {
        font-size: 0.9rem;
    }

    .additional-links p {
        font-size: 0.82rem;
    }

    .back,
    .otp-link {
        font-size: 0.82rem;
    }
}

/* ── MOBILE ≤ 600px ── */
@media (max-width: 600px) {
    .vision-section {
        padding: 18px 12px;
    }

    .vision-section p {
        font-size: 0.82rem;
        max-width: 100%;
    }

    .auth-card {
        width: 400px;
        padding: 20px 16px;
        margin: 1rem auto 2.5rem auto;
        border-radius: 14px;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

    .auth-tabs {
        margin-bottom: 16px;
    }

    .auth-tabs button {
        font-size: 13px;
        padding: 8px 6px;
    }

    .signup-form input[type="email"],
    .signup-form input[type="password"],
    .signup-form input[type="text"],
    .login-form input[type="email"],
    .login-form input[type="password"],
    #otp-section input[type="text"],
    #forgot-password-container input[type="email"],
    #forgot-password-container input[type="password"],
    #forgot-password-container input[type="text"],
    .form-group input {
        font-size: 13px;
        padding: 9px 10px;
        margin: 6px 0;
    }

    .signup-form button[type="submit"],
    .login-form button[type="submit"],
    #otp-section button[type="button"]:not(#resend-otp),
    #sendOtpBtn,
    #verifyOtpBtn,
    #resetForm button[type="submit"] {
        font-size: 13px;
        padding: 9px 16px;
        width: 100%;
        border-radius: 8px;
    }

    #resend-otp,
    #resendOtpBtn {
        font-size: 0.82rem;
        padding: 8px;
        width: 100%;
        border-radius: 8px;
    }

    .otp-form-container {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .otp-form-container h2 {
        font-size: 0.9rem;
    }

    .otp-form-container p {
        font-size: 0.8rem;
    }

    #otp-input {
        font-size: 1.1rem;
        letter-spacing: 5px;
        padding: 10px 6px;
    }

    .forgot_password h2 {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }

    .forgot_password label {
        font-size: 12px;
    }

    .checkbox-line,
    .reset-check {
        font-size: 12px;
        margin: 4px 0 10px;
    }

    .fail-message,
    .otp-error-message,
    .success-message,
    .otp-status {
        font-size: 12px;
        padding: 8px 10px;
    }

    .additional-links p {
        font-size: 0.8rem;
    }

    .back,
    .otp-link {
        font-size: 0.8rem;
        margin-top: 10px;
    }

    .field-error-msg {
        font-size: 0.8rem;
    }

    #otp-expiry-timer,
    .otp-expiry-timer {
        font-size: 0.8rem;
    }

    #countdownText,
    .countdownText {
        font-size: 0.78rem;
    }
}

/* ── MOBILE ≤ 480px ── */
@media (max-width: 480px) {
    .auth-card {
        width: 96%;
        padding: 18px 14px;
        margin: 3.5rem auto 2rem auto;
        border-radius: 12px;
        margin-bottom: 120px;
    }

    .auth-tabs button {
        font-size: 12px;
        padding: 7px 4px;
    }

    .signup-form input[type="email"],
    .signup-form input[type="password"],
    .signup-form input[type="text"],
    .login-form input[type="email"],
    .login-form input[type="password"],
    #otp-section input[type="text"],
    #forgot-password-container input[type="email"],
    #forgot-password-container input[type="password"],
    #forgot-password-container input[type="text"],
    .form-group input {
        font-size: 13px;
        padding: 8px 10px;
        border-radius: 7px;
    }

    .signup-form button[type="submit"],
    .login-form button[type="submit"],
    #otp-section button[type="button"]:not(#resend-otp),
    #sendOtpBtn,
    #verifyOtpBtn,
    #resetForm button[type="submit"] {
        font-size: 13px;
        padding: 9px 14px;
        width: 100%;
        border-radius: 7px;
    }

    #resend-otp,
    #resendOtpBtn {
        font-size: 0.8rem;
        padding: 8px;
        width: 100%;
        border-radius: 7px;
    }

    #otp-input {
        font-size: 1rem;
        letter-spacing: 4px;
        padding: 9px 6px;
        border-radius: 8px;
    }

    .otp-form-container {
        padding: 16px 12px;
        border-radius: 10px;
    }

    .checkbox-line,
    .reset-check {
        font-size: 11px;
    }

    .fail-message,
    .otp-error-message,
    .success-message,
    .otp-status {
        font-size: 11px;
        padding: 7px 9px;
        border-radius: 5px;
    }

    .additional-links p,
    .back,
    .otp-link {
        font-size: 0.78rem;
    }
}


/* ── iPad Air (820px) ── */
@media (min-width: 769px) and (max-width: 820px) {
.footer-main { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; padding: 1.5rem 2rem;margin-top: 300px; }
    .footer-center { margin-top: 20px; }
    .footer-right { margin-top: 20px; }
}