:root {
  --brand: #10b981;
  --brand-dark: #059669;
  --dark: #0b1220;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
}

.auth-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.auth-card .card-header {
  border-bottom: none;
  background: linear-gradient(135deg, var(--dark) 0%, #16233a 100%);
}
.auth-card .card-footer {
  border-top: 1px solid var(--border);
}

/* --- Inputs --- */
.auth-form .form-group {
  margin-bottom: 1.35rem;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.auth-form .form-label i {
  color: var(--brand);
  font-size: 0.95rem;
}

.auth-form .form-control,
.auth-form .form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #f8fafc;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-form .form-control::placeholder {
  color: #9ca3af;
}
.auth-form .form-control:hover,
.auth-form .form-select:hover {
  border-color: #9ca3af;
}
.auth-form .form-control:focus,
.auth-form .form-select:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
  outline: none;
}

/* Input group with a leading icon */
.auth-form .input-with-icon {
  position: relative;
}
.auth-form .input-with-icon > i {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 3;
}
.auth-form .input-with-icon .form-control,
.auth-form .input-with-icon .form-select {
  padding-left: 2.7rem;
}
.auth-form .input-with-icon:focus-within > i {
  color: var(--brand);
}

/* Password visibility toggle */
.auth-form .password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.05rem;
  padding: 0.25rem;
  cursor: pointer;
  z-index: 3;
}
.auth-form .password-toggle:hover {
  color: var(--text);
}

/* Error state */
.auth-form .is-invalid-input {
  border-color: #ef4444 !important;
  background: #fff;
}
.auth-form .is-invalid-input:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}
.auth-form .error-list {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
}
.auth-form .error-list li {
  color: #dc2626;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Submit button */
.auth-form .btn-submit {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  width: 100%;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.auth-form .btn-submit:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
}
.auth-form .btn-submit:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #9ca3af;
  font-size: 0.8rem;
  margin: 1.25rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-help-text {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

/* Register form: two columns on tablet/desktop so it uses the width well. */
.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 1.25rem;
}
@media (min-width: 768px) {
  .auth-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.auth-form-grid .form-group {
  margin-bottom: 0;
}
.auth-form-grid .form-group--full {
  grid-column: 1 / -1;
}
.auth-form-grid .btn-submit {
  grid-column: 1 / -1;
}
