/* ====== AUTH PAGES ====== */

body {
    background-color: #a3a1a1; /* light gray */
}


.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 360px;  /* slightly smaller */
  margin: 0 auto;
  padding: 20px;
}

.auth-box {
    background: #ececec;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.auth-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.auth-box h2 {
    margin-bottom: 15px;
    font-size: 22px;
    color: #004d40;
}

/* Page Title & Subtitle */
.auth-wrapper h1 {
    font-size: 32px;
    color: #023c32;
    text-align: center;
    margin-bottom: 8px;
    animation: fadeInDown 1s ease;
}

.auth-wrapper p.subtitle {
    text-align: center;
    color: #22312b;
    margin-bottom: 25px;
    font-size: 15px;
    animation: fadeIn 0.8s ease;
}

/* Inputs */
.auth-box input {
    width: 90%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #187c6b;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.auth-box input:focus {
    border-color: #023c32;
    box-shadow: 0 0 6px rgba(0,123,255,0.25);
    outline: none;
}

/* Buttons */
.auth-box button {
    align-items: center;
    width: 95%;
    padding: 10px;
    background: #004d40;;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 15px;
}
.auth-box button:hover {
    background: #023c32;;
    transform: scale(1.02);
    box-shadow: 0 10 6px rgba(34, 37, 39, 0.25);
}

/* Links */
.auth-box a {
    color: #006eff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
    transition:  0.5s;
}
.auth-box a:hover {
    
    color: #023c32;
    font-size: 15.5px;
    transition:  0.5s;
}

/* Alerts */
.auth-box .error {
    background: #ffe6e6;
    color: #d8000c;
    padding: 8px;
    border: 1px solid #d8000c;
    border-radius: 6px;
    margin-bottom: 12px;
    text-align: left;
    font-size: 14px;
}

.auth-box .success {
    background: #e6ffea;
    color: #4f8a10;
    padding: 8px;
    border: 1px solid #4f8a10;
    border-radius: 6px;
    margin-bottom: 12px;
    text-align: left;
    font-size: 14px;
}

/* Forgot Password Form */
#forgotForm {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0;
    margin-top: 0;
}
#forgotForm.open {
    max-height: 300px; /* enough to show the form */
    padding: 12px;
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}
#forgotForm h3 {
    margin-bottom: 8px;
    font-size: 16px;
    color: #144b4b;
}
#forgotForm input,
#forgotForm button {
    margin-top: 6px;
}

/* Animations */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}
@keyframes fadeInDown {
    from {opacity: 0; transform: translateY(-10px);}
    to {opacity: 1; transform: translateY(0);}
}


/* Style error message under input */
.auth-box small {
  color: #d8000c;          /* error red */
  font-size: 13px;
  margin-top: 4px;
  display: block;
  text-align: left;
  font-weight: 600;
  font-family: Arial, sans-serif;
}

/* Highlight input with error */
.input-error {
  border: 1.8px solid #d8000c !important;
  background-color: #fff6f6;
  transition: border-color 0.3s ease;
}


/* ====== MOBILE OPTIMIZATION ====== */
@media (max-width: 480px) {
  body {
    background-color: #a3a1a1;
    padding: 10px;
  }

  .auth-wrapper {
    max-width: 100%;
    padding: 15px;
  }

  .auth-box {
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  }

  .auth-wrapper h1 {
    font-size: 26px; /* reduce heading size */
  }

  .auth-box h2 {
    font-size: 20px; /* reduce sub-heading size */
  }

  .auth-box input {
    width: 100%; /* full width on mobile */
    font-size: 15px;
    padding: 12px;
  }

  .auth-box button {
    width: 100%;
    font-size: 16px;
    padding: 12px;
  }

  .auth-box a {
    font-size: 14px;
    display: inline-block;
    margin-top: 10px;
  }

  /* Alerts adapt to mobile width */
  .auth-box .error,
  .auth-box .success {
    font-size: 13px;
    padding: 10px;
  }
}

