/* ================= GLOBAL ================= */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f0f9f9;
    background-image: url('josh-gordon-fzHmP6z8OQ4-unsplash.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
}

/* ================= LAYOUT ================= */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
}

/* ================= LOGIN CONTAINER ================= */
#login-container {
    max-width: 400px;
    width: 100%;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 10% auto;
    box-sizing: border-box;
}

/* ================= INPUT FIELDS ================= */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background-color: #fff;
    border: 1px solid #00D100;
    border-radius: 4px;
    box-sizing: border-box;
}

/* error state */
.input-error {
    border: 2px solid #FF4D4D !important;
    background-color: #fff5f5;
}

.error-text {
    color: #FF4D4D;
    font-size: 0.85rem;
    margin-top: -5px;
    margin-bottom: 10px;
    text-align: left;
}

/* ================= BUTTONS ================= */
input[type="submit"],
button {
    width: 80%;
    padding: 15px;
    background: linear-gradient(45deg, #00D100, #00BFFF);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
    font-size: 17px;
}

button:hover,
input[type="submit"]:hover {
    background: linear-gradient(45deg, #FF4500, #00D100);
}

/* ================= LINKS ================= */
a {
    color: #4C9AFF;
    text-decoration: none;
}

a:hover {
    color: #00BFFF;
    text-decoration: underline;
}

/* ================= TITLE ================= */
h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    text-align: center;
    background-image: linear-gradient(90deg, #00D100, #00BFFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* ================= PARAGRAPHS ================= */
p {
    color: #333333;
}

/* ================= POPUPS (FIXED CORE) ================= */

/* hidden utility */
.hidden {
    display: none !important;
}

/* base popup overlay */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;   /* IMPORTANT */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* when opened via JS */
.popup.show {
    display: flex;
}

/* popup content box */
.popup-content {
    max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;

  background-color: #fff;
  padding: 30px 55px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  text-align: center;
  align-items: center;
}
.popup-content label {
    display: block;       /* ensures it takes full width */
    text-align: left;     /* aligns text to the left */
    font-weight: 600;     /* slightly bold */
    margin-bottom: 5px;   /* spacing between label and input */
    width: 100%;          /* make sure it aligns with input width */
}
.popup-content .form-group {
    width: 100%;
    margin-bottom: 5px;
}

/* scrollbar (optional but nice) */
.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-track {
    background: transparent;
}

/* close button */
.password-reset-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    transition: color 0.2s ease;
}

.password-reset-close:hover {
    color: #00BFFF;
}
 /* ================= POPUP FORM FIX ================= */

/* Make labels bold + consistent */
/*.popup-content label {
    font-weight: 700;
    width: 100%;
    text-align: left;
    display: block;
    margin-bottom: 5px;
}*/

/* Ensure inputs are always same width */
/*.popup-content input,
.popup-content textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #00D100;
    font-size: 16px;
}*/

/* Fix spacing so fields align neatly */
/*.popup-content .input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
*/
/* ================= MOBILE ================= */
@media (max-width: 600px) {
    #login-container {
        width: 95%;
        padding: 20px;
    }

    input[type="submit"],
    button {
        width: 100%;
    }
}