body {
  margin: 0;
  padding: 0;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: sans-serif;
}

/* Reset bootstrap interference for auth form */
.auth-page input,
.auth-page button {
    padding: 5px;           /* remove Bootstrap padding */
    margin: 5px;            /* remove Bootstrap margin */
    font-size: 14px;      /* standard size */
    line-height: normal;  
    box-sizing: border-box;
}

.auth-page input:focus,
.auth-page button:focus {
    outline: none;        /* remove Bootstrap focus outline */
}

.auth-page input[type="text"],
.auth-page input[type="password"],
.auth-page input[type="email"] {
    padding: 10px 0;      /* our desired padding */
}


.auth-form-box {
  margin-top: 40px;
  width: 380px;
  height: 480px;
  position: relative;
  margin: 6% auto;
  background: rgba(230, 230, 230, 0.9);
  padding: 5px 0 0;
  overflow: hidden;
  box-shadow: 0 0 90px 2px black;
}

.auth-button-box {
  width: 220px;
  height: 35px;
  margin: 35px auto;
  position: relative;
  box-shadow: 0 0 90px 2px black;
  border-radius: 130px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.auth-toggle-btn {
  flex: 1;
  padding: 10px 0;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
  position: relative;
  z-index: 1;
  font-weight: bold;

  /* default inactive */
  color: rgba(100, 149, 237); /* slightly faded white */
  transition: color 0.3s;
}

.auth-toggle-btn.active {
  color: #fff;  /* fully white for active */
}



#auth-btn-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  height: 100%;
  background: linear-gradient(to right, #004261, #00628F);
  border-radius: 130px;
  transition: 0.5s;
  z-index: 0;
}

.auth-input-group {
  top: 100px;
  position: absolute;
  width: 280px;
  transition: 0.5s;
}

.auth-input-field {
  width: 100%;
  padding: 10px 0;
  margin: 5px 0;
  border: none;
  border-bottom: 1px solid #999;
  outline: none;
  background: transparent;
}

.auth-submit-btn {
  width: 100%;
  padding: 10px 30px;
  cursor: pointer;
  display: block;
  margin: auto;
  background: linear-gradient(to right, #004261, #00628F);
  border: none !important;
  border-radius: 50px !important;
  outline: none;
  font-weight: bold;
  color: white;
  box-shadow: none !important;
}

.auth-check {
  margin: 30px 10px 30px 0;
  vertical-align: middle;
}

.auth-form-box span {
  color: #777;
  font-size: 12px;
  position: relative;
  top: -2px;
}

#auth-register {
  top: 100px;
  left: 450px;
}

#auth-login {
  top: 120px;
  left: 50px;
}

.auth-error-msg {
  color: red;
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
}




/* =========================
   Autofill + focus fixes
   Put this at the END of authstyle.css
   ========================= */

/* Fully transparent autofill background */
.auth-input-field:-webkit-autofill,
.auth-input-field:-webkit-autofill:hover,
.auth-input-field:-webkit-autofill:focus,
.auth-input-field:-webkit-autofill:active {
  background: transparent !important;
  -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
  box-shadow: 0 0 0px 1000px transparent inset !important;

  -webkit-text-fill-color: #000 !important; /* keep text black */
  caret-color: #000; /* cursor color */
  transition: background-color 9999s ease-in-out 0s !important;
}
/* optional extra for some Chrome builds (internal pseudo-class) */
input:-internal-autofill-selected {
  background-color: rgba(230,230,230,0.9) !important;
  box-shadow: 0 0 0px 1000px rgba(230,230,230,0.9) inset !important;
}

/* 2) Remove default focus glow / outline that can appear as cyan */
.auth-input-field:focus,
.auth-input-field:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  /* keep your bottom border visible and style it as you like */
  border-bottom: 1px solid #999 !important;
  background: transparent !important;
}

/* If you want a subtle focused-bottom-border color, replace above border-bottom with this:
.auth-input-field:focus { border-bottom: 1px solid #004261 !important; }
*/

/* 3) Firefox autofill handling */
.auth-input-field:-moz-autofill {
  box-shadow: 0 0 0px 1000px rgba(230,230,230,0.9) inset !important;
  -moz-text-fill-color: #000 !important;
}

/* 4) make sure inputs remain visually consistent when toggling type (password<->text) */
.auth-input-field[type="text"],
.auth-input-field[type="password"] {
  background: transparent !important;
  -webkit-text-fill-color: #000 !important;
}

/* Helpful: keep .auth-form-box background color in one place so it matches */
.auth-form-box {
  background: rgba(230, 230, 230, 0.9); /* your existing value */
}


/* Responsive adjustments */
/* Keep original sizes, just make container scrollable on small devices */
* Mobile-friendly container */
@media screen and (max-width: 480px) {
  .auth-form-box {
    width: 90%; /* shrink form to fit smaller screens */
    max-width: 380px; /* maintain original desktop width if possible */
    height: auto; /* allow height to expand with content */
  }

  /* Inputs width same as container */
  .auth-input-group {
    width: 100%;
  }

  /* Keep Login form offscreen initially */
  #auth-register {
    left: 100%; /* offscreen right initially */
  }

  #auth-login {
    left: 100%; /* offscreen right initially */
  }
}