/* Form Container */
form {
  width: 100%;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

/* Labels */
.form-label,
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

/* Form Inputs */
.form-input,
textarea {
  display: block;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  padding: 0.625rem 0.875rem;
  color: #111827;
  font-size: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Input Placeholders */
.form-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Input Focus State */
.form-input:focus,
textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Checkboxes */
.form-checkbox,
input[type="checkbox"] {
  height: 1rem;
  width: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  color: #4f46e5;
  cursor: pointer;
}

.checkbox-label,
label[for*="remember"] {
  margin-left: 0.75rem;
  display: inline;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  font-weight: normal;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  align-items: center;
}

/* Form Row (for grouped elements) */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}


/* Links in forms */
.forgot-password-link,
.forgot-password-link a,
a.form-link {
  font-size: 0.875rem;
  text-align: right;
}

.forgot-password-link a {
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.15s;
}

.forgot-password-link a:hover {
  color: #4338ca;
}

/* Helper text and hints */
.password-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Alerts/Messages */
.alert,
.error-message,
.success-message {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid;
  display: none;
}

.alert.show,
.error-message.show,
.success-message.show {
  display: block;
}

.alert-error,
.error-message {
  color: #991b1b;
  background-color: #fee2e2;
  border-color: #fecaca;
}

.alert-success,
.success-message {
  color: #166534;
  background-color: #dcfce7;
  border-color: #bbf7d0;
}

/* Utility */
.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .forgot-password-link {
    text-align: left;
    width: 100%;
  }
}
