/* --- Reset and basic setup --- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb; /* soft light gray background */
  color: #111827; /* dark gray text */
}

/* --- Header --- */
.site-header {
  background: #ffffff; /* white header */
  border-bottom: 1px solid #e5e7eb; /* light gray line below header */
}

.nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  text-decoration: none;
  color: #0b3b66; /* dark blue */
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

/* --- Centering the form on the page --- */
.main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 24px;
}

.form-section {
  width: 100%;
  max-width: 800px;
}

/* --- Card (white box) --- */
.form-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* soft shadow */
}

.form-card h1 {
  margin-top: 0;
  font-size: 22px;
  color: #0b3b66;
}

/* --- Form style --- */
form {
  display: grid;
  gap: 15px;
}

.form-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 14px;
  color: #1f2937;
}

input {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  transition: 0.2s;
}

input:focus {
  outline: none;
  border-color: #3b82f6; /* blue border when clicked */
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* --- Error and success --- */
input.invalid {
  border-color: #ef4444; /* red */
}

input.valid {
  border-color: #10b981; /* green */
}

.error {
  color: #b91c1c; /* red text */
  font-size: 13px;
  min-height: 18px; /* keeps space for message */
}

/* --- Password strength bar --- */
.password-strength {
  height: 6px;
  background: #eef2ff; /* light background for the bar */
  border-radius: 6px;
  margin-top: 6px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f97316, #10b981); /* orange to green */
  transition: width 0.3s ease;
}

.help {
  font-size: 13px;
  color: #374151;
}

/* --- Buttons --- */
.btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #0b63d6; /* bright blue */
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.btn:hover {
  background: #094ba8; /* darker blue when hovered */
}

.btn-secondary {
  background: transparent;
  color: #0b63d6;
  border: 1px solid #0b63d6;
}

.success-message {
  text-align: center;
  padding: 18px;
  border-radius: 8px;
}

/* --- Responsive design: two columns on larger screens --- */
@media (min-width: 700px) {
  form {
    grid-template-columns: 1fr 1fr; /* two equal columns */
    column-gap: 20px;
  }

  /* Make some fields full width */
  .form-control:nth-child(1),
  .form-control:nth-child(4) {
    grid-column: 1 / -1; /* stretch across both columns */
  }
}

/* --- Show/Hide password button --- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  flex: 1;
  padding-right: 40px; /* space for the eye */
}

.toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.7;
}

.toggle-btn:hover {
  opacity: 1;
}
