
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@700&family=Poppins:wght@400;500;600&display=swap');
:root{
  --accent-color: #6884d3;
  --base-color: white;
  --text-color: #28375f;
  --input-color: #F3F0FF;
}
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", serif;
}
html{
  font-family: Poppins,Segoe 'Segoe UI', sans-serif;
  font-size: 12pt;
  color: var(--text-color);
  text-align: center;
}
body{
  display: flex;
  justify-content: center;
  align-items: center;/*center*/
  min-height: 100vh;
  background: linear-gradient(to right, #e2e2e2, #c9d6ff);
  background-size: cover;
  background-position: right;
  overflow: auto;
  padding: 20px 0;
}
.center{
  position: relative;
  box-sizing: border-box;
  background-color: var(--base-color);
  height: auto;/*fit-content*/
  width: min(100%, 480px);
  padding: 10px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.center h1,h3{
  font-size: 3rem;
  font-weight: 900;
  font-family: 'Poppins', sans-serif;
  color: #526fc0;
  text-align: center;
  margin-top: 13px;
  margin-bottom: 13px;
  text-transform: uppercase;
}
.center form{
  width: min(400px, 100%);
  margin-top: 20px;
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
form .txt_field{
  position: relative;
  border-bottom: 2px solid #adadad;
  margin: 20px 0;
}
.txt_field input{
  width: 100%;
  padding: 0 5px;
  height: 40px;
  font-size: 16px;
  border: none;
  background: none;
  outline: none;
  position: relative;
  z-index: 1;
}
.txt_field label{
  position: absolute;
  top: 50%;
  left: 5px;
  color: #adadad;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  transition: .5s;
  z-index: 0;
}
.txt_field span::before{
  content: '';
  position: absolute;
  top: 40px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-color);
  transition: .5s;
}
.txt_field input:focus ~ label,
.txt_field input:valid ~ label{
  top: -5px;
  color: var(--accent-color);
}
.txt_field input:focus ~ span::before,
.txt_field input:valid ~ span::before{
  width: 100%;
}
.pass{
  margin: -5px 0 20px 5px;
  color: #a6a6a6;
  cursor: pointer;
}
.pass:hover{
  text-decoration: underline;
}

input[type="submit"]:hover{
  border-color: #354677;
  transition: .5s;
}
.signup_link{
  margin: 30px 0;
  text-align: center;
  font-size: 16px;
  color: #666666;
}
.signup_link a{
  color: #526fc0;
  text-decoration: none;
}
.signup_link a:hover{
  text-decoration: underline;
}
input[type="submit"]{
  width: 85%;           /* pehle 100% tha */
  height: 50px;
  margin: 20px auto 0; /* top se gap + horizontally center */
  display: block;
  border: none;
  background: var(--accent-color);
  border-radius: 25px;
  font-size: 18px;
  color: #e9f4fb;
  font-weight: 700;
  cursor: pointer;
}
input[type="submit"]:hover{
  background: #526fc0;        /* thora darker shade */
  transform: translateY(-1px); /* halka sa upar lift */
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.password-group{
  margin-bottom: 20px;
}

.form-group{
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 13px;
}
.form-group label {
  flex-shrink: 0;
  height: 50px;
  width: 50px;
  background-color: var(--accent-color);
  fill: var(--base-color);
  color: var(--base-color);
  border-radius: 10px 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 500;
}
.form-group label svg{
  fill: white !important;
}

.form-group input {
  box-sizing: border-box;
  flex-grow: 1;
  min-width: none;
  height: 50px;
  padding: 1em;
  font: inherit;
  background: transparent;
  border-radius: 0 10px 10px 0;
  transition: 150ms ease;
  border: 2px solid var(--input-color);
  background-color: var(--input-color);
  border: none;
  transition: 150ms ease;
  border-left: none;
}
.form-group input::placeholder{
  color: var(--text-color);
  opacity: 0.7;
}

.form-group input:focus{
  background-color: #c9d6ff !important;
  outline: none;
}

.form-group:has(input:focus) label{
  background-color: var(--text-color) !important;
}

.form-group input:hover {
  border-color: var(--accent-color);
}

.form-group input::placeholder{
  color: var(--text-color);
  opacity: 0.7;
}
/**/
/* Force same error background for all inputs (including password) */
.form-group.incorrect input {
  background-color: #c9d6ff !important;
  border-color: #f06272 !important;
}

/* Prevent focus from overriding error color */
.form-group.incorrect input:focus {
  background-color: #c9d6ff !important;
}

/**/

/* Error styling for form validation */
.incorrect {
    border: 2px solid #ff0000 !important; /* Red border for incorrect fields */
}

.error-message {
  background-color: #c9d6ff; /* Light red background */
  border: 1px solid #ff0000; /* Red border */
  color: #d8000c; /* Dark red text */
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 14px;
}

.error-message div {
  margin-bottom: 5px;
}
form div.incorrect {
  border: 0px solid #f06272 !important;
       /* border-radius: 10px; /* Add this for rounded corners */
}
form div.incorrect label {
  background-color: #f06272 !important;
  border-radius: 10px 0 0 10px !important;
}

form div.incorrect input {
  border: 2px solid #f06272 !important;
  background-color: #c9d6ff !important;
  box-shadow: 0 0 0 3px rgba(240, 128, 128, 0.06);
  border-left: 0 10px 10px 0 !important; /* Since you removed left border earlier*/
  }

    
    
/* Make error message stand out */
/* Error message box under REGISTER heading */
.form-errors {
  width: 100%;
  max-width: 400px;
  background-color: #fff1f1;
  border: 1px solid #f06272;
  color: #d8000c;
  padding: 10px 12px;
  margin: 10px auto 15px;
  border-radius: 8px;
  font-size: 12px;
  text-align: left;
  display: none;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
  list-style-position: inside;
}

.form-errors li {
  margin-bottom: 6px;
}
     *{
        box-sizing: border-box;
    }

/* ===== PASSWORD FIELD SPECIFIC STYLES ===== */
/* Password toggle styles */
.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.hidden {
  display: none;
}
